@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.internal.md +82 -0
  3. package/README.md +14 -40
  4. package/README.public.md +14 -0
  5. package/dist/AddClientCallout-DRcy9Dqb.js +101 -0
  6. package/dist/AnswerModal-Dc3cgkap.js +3291 -0
  7. package/dist/AttachmentItem-Bef5zdHr.js +171 -0
  8. package/dist/BaseUpload--paElAyr.js +2472 -0
  9. package/dist/BlockMedia-DbVE3vsb.js +103 -0
  10. package/dist/CCallout-81NkOge7.js +104 -0
  11. package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-M3hi1VVi.js} +91 -49
  12. package/dist/CDropdownItem-DvaU14-V.js +749 -0
  13. package/dist/CFormField.vue_vue_type_script_setup_true_lang-B4s_Zfsp.js +292 -0
  14. package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BBQ_UIc_.js} +13 -21
  15. package/dist/CPhoneInput-Dw_LJDgc.js +207 -0
  16. package/dist/CPriceInput-BfWZZv0f.js +140 -0
  17. package/dist/CSelect-B1AAIFbK.js +98 -0
  18. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D56L_PYT.js +51 -0
  19. package/dist/ClientAutocomplete-D5veIKyZ.js +532 -0
  20. package/dist/ClientModal-D8_TPzkv.js +1181 -0
  21. package/dist/ColorPicker-C0OahiVg.js +1408 -0
  22. package/dist/CompanyModal-CjzwQU4B.js +250 -0
  23. package/dist/ContentWrapper-DrmiaFOz.js +265 -0
  24. package/dist/CoverBlockSettings-C9DWvA-C.js +861 -0
  25. package/dist/DocAnswer-BEsvAMEp.js +33 -0
  26. package/dist/DocDetails--LO0-S5d.js +448 -0
  27. package/dist/DocForm-D6_tGw06.js +6748 -0
  28. package/dist/DocFormSend-CdFL6rOD.js +171 -0
  29. package/dist/DocLinks-CIQFUh7c.js +36 -0
  30. package/dist/DocModalBase-DtPJK9sp.js +29 -0
  31. package/dist/DocPrint-qX88Ue2I.js +399 -0
  32. package/dist/DocReceipt-BbXoCmpz.js +341 -0
  33. package/dist/DocSendReminder-DZqOkd63.js +181 -0
  34. package/dist/DocTextEditor-Cw-Skmd4.js +19413 -0
  35. package/dist/DocTimeline-CdbSOVD1.js +537 -0
  36. package/dist/DocumentClient-DtTv7gkF.js +90 -0
  37. package/dist/DocumentLayout-BRfEjoYq.js +1368 -0
  38. package/dist/DocumentLogotype-CUNzyewq.js +162 -0
  39. package/dist/DocumentVoided-CgDt-JFI.js +33 -0
  40. package/dist/EmbedInput-rPvTnpXn.js +157 -0
  41. package/dist/EmbedSettings-BtmFxYGB.js +103 -0
  42. package/dist/ErrorCallout-B6YrdUsG.js +34 -0
  43. package/dist/FilePreviewModal-BfIqIIbb.js +202 -0
  44. package/dist/Flag-CE3K7-8a.js +41 -0
  45. package/dist/HeaderSettings-5QR7MmVf.js +720 -0
  46. package/dist/ImageSelectModal-E3hGi8ty.js +119 -0
  47. package/dist/ImageUploadWrapper-BaexFAAh.js +1585 -0
  48. package/dist/Index--gv5fH24.js +201 -0
  49. package/dist/{Index-D4XgxmbD.js → Index-B3ycPjAI.js} +10 -18
  50. package/dist/Index-B7ECpXAa.js +28 -0
  51. package/dist/Index-BIXfUsHH.js +52 -0
  52. package/dist/Index-BM658CCq.js +93 -0
  53. package/dist/{Index--qPMWUMT.js → Index-B_DCM_bL.js} +48 -61
  54. package/dist/Index-BcMATT2_.js +47 -0
  55. package/dist/Index-BpWFU3Td.js +68 -0
  56. package/dist/Index-BulSI5iO.js +38 -0
  57. package/dist/Index-CHInIRw5.js +228 -0
  58. package/dist/Index-COYqsxs9.js +25 -0
  59. package/dist/Index-CSGk060H.js +1098 -0
  60. package/dist/Index-CV2O2fWT.js +21 -0
  61. package/dist/{Index-Bu0MGrj6.js → Index-CXqdBSZ3.js} +313 -206
  62. package/dist/Index-CavttI66.js +126 -0
  63. package/dist/Index-CbZ65-O3.js +629 -0
  64. package/dist/Index-CqrTij2j.js +70 -0
  65. package/dist/Index-CrsGxDWC.js +16 -0
  66. package/dist/Index-CxY5Ii6K.js +49 -0
  67. package/dist/Index-D7Z2w9cd.js +163 -0
  68. package/dist/Index-D7ixmzBH.js +76 -0
  69. package/dist/Index-D7pzv-AR.js +74 -0
  70. package/dist/Index-D9keESQi.js +159 -0
  71. package/dist/Index-Dd6ueeUc.js +136 -0
  72. package/dist/{Index-DIOiMm9f.js → Index-DexIUz3R.js} +10 -18
  73. package/dist/Index-Dnmt6W0u.js +140 -0
  74. package/dist/Index-DtcV6rl1.js +4 -0
  75. package/dist/Index-DuDVafLn.js +3452 -0
  76. package/dist/Index-L913X8Ly.js +102 -0
  77. package/dist/Index-Mdn0niR_.js +28 -0
  78. package/dist/Index-_ellB2fs.js +363 -0
  79. package/dist/{Index-DcQbh-z2.js → Index-baSB5tPv.js} +9 -17
  80. package/dist/Index-bgKndj-l.js +39 -0
  81. package/dist/Index-lNYXAFUH.js +87 -0
  82. package/dist/Index.vue_vue_type_script_lang-DLogex2i.js +671 -0
  83. package/dist/InputToggleRow-BCvMVbW-.js +99 -0
  84. package/dist/ManualPopover-BzBvSl_x.js +57 -0
  85. package/dist/MediaWrapper-_LPau2Ks.js +18 -0
  86. package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-DgcOjUmQ.js} +13 -17
  87. package/dist/PackageGroup-1X3jUipj.js +1058 -0
  88. package/dist/PdfTerms-Bf4TlzP5.js +34 -0
  89. package/dist/PdfViewer-BdhwFfc6.js +392 -0
  90. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-BgsfquR_.js +17 -0
  91. package/dist/PriceHeader-DyC8xssf.js +488 -0
  92. package/dist/SearchApi-C__orGkO.js +137 -0
  93. package/dist/SendForm-Be8uiuaJ.js +7031 -0
  94. package/dist/Setup-DbXs2Zar.js +47 -0
  95. package/dist/{SmartList-Qgu0rMrI.js → SmartList-BmmtZoZ0.js} +16 -24
  96. package/dist/Sortable.vue_vue_type_script_setup_true_lang-D0mloJIN.js +1303 -0
  97. package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-DsN6v5yj.js} +169 -49
  98. package/dist/ThemeColorRow-BL6p09pN.js +108 -0
  99. package/dist/ToggleBinding-B-tVioQ9.js +44 -0
  100. package/dist/UploadModal-BnA1xLMy.js +134 -0
  101. package/dist/VideoPlayerInput-D38S1IDH.js +135 -0
  102. package/dist/VideoPlayerSettings-B5iXoj5E.js +78 -0
  103. package/dist/VideoSelectModal-BNCoMFKU.js +217 -0
  104. package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
  105. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  106. package/dist/{debounce-C1AuSpOZ.js → debounce-CBRJalZI.js} +7 -7
  107. package/dist/dom-CkTGWrfu.js +69 -0
  108. package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-T94b2Y6F.js} +1 -1
  109. package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-jssoGOce.js} +2 -2
  110. package/dist/helpers-Vo_6Zz3M.js +44 -0
  111. package/dist/index-8g2jwLJx.js +513 -0
  112. package/dist/index-B0udVHyo.js +125 -0
  113. package/dist/index-D63IJVsJ.js +3525 -0
  114. package/dist/index-DCYCN_FR.js +508 -0
  115. package/dist/index-FRHGChx1.js +149 -0
  116. package/dist/index-HXiq8Yxs.js +270 -0
  117. package/dist/index-jOufDnZ8.js +188 -0
  118. package/dist/index.es.js +2 -5
  119. package/dist/index.umd.js +306 -1505
  120. package/dist/{main-WKzC-Dnu.js → main-C4OdoeS2.js} +36750 -37369
  121. package/dist/mapFormMixin-v-nbaWcx.js +1544 -0
  122. package/dist/omit-GuxX6Zt-.js +31 -0
  123. package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-C-7OMKKW.js} +4 -4
  124. package/dist/regions-BdZt9Srn.js +1250 -0
  125. package/dist/splitpanes-DChJiJ8d.js +342 -0
  126. package/dist/style.css +1 -4
  127. package/dist/template-m1V22cUt.js +1493 -0
  128. package/dist/{throttle-CWPJmFid.js → throttle-WWMDZKby.js} +2 -2
  129. package/dist/tippy.esm-Dz-faEsS.js +1994 -0
  130. package/dist/useTermsModal-C_eLdGLi.js +87 -0
  131. package/dist/{utils-CA_Zy6u1.js → utils-vnvZGRwQ.js} +8 -11
  132. package/dist/validation-C-dQpENM.js +40 -0
  133. package/package.json +25 -31
  134. package/.eslintrc.cjs +0 -4
  135. package/dist/AddClientCallout-BWnvyBcK.js +0 -46
  136. package/dist/AnswerModal-CLGRdSnK.js +0 -3874
  137. package/dist/AttachmentItem-BPS0-wyc.js +0 -78
  138. package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
  139. package/dist/BaseUpload-9gPgI7r6.js +0 -1977
  140. package/dist/BlockMedia-DkPFWiYL.js +0 -76
  141. package/dist/CCallout-T26jwUby.js +0 -59
  142. package/dist/CDropdownItem-BE8BAMD1.js +0 -636
  143. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  144. package/dist/CFormField-DECEfoVq.js +0 -241
  145. package/dist/CPriceInput-C4SOB-P5.js +0 -112
  146. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  147. package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
  148. package/dist/ClientModal-BXFYvYCF.js +0 -625
  149. package/dist/ColorPicker-CZ_bJabP.js +0 -2879
  150. package/dist/CompanyModal-CDr3t28n.js +0 -141
  151. package/dist/ContentWrapper-BwmMoe4W.js +0 -183
  152. package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
  153. package/dist/DocAnswer-BR59xzkT.js +0 -36
  154. package/dist/DocDetails-D1qbCbps.js +0 -259
  155. package/dist/DocForm-DBc2a7z5.js +0 -7272
  156. package/dist/DocFormSend-Casix-yG.js +0 -144
  157. package/dist/DocLinks-DGTaewyX.js +0 -38
  158. package/dist/DocModalBase-BbS_qvSv.js +0 -28
  159. package/dist/DocPrint-0PqX3mbJ.js +0 -240
  160. package/dist/DocReceipt-CU3VD5pt.js +0 -210
  161. package/dist/DocSendReminder-CuycBspr.js +0 -137
  162. package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
  163. package/dist/DocTimeline-DJuv3yBe.js +0 -481
  164. package/dist/DocumentClient-C25XXzz6.js +0 -136
  165. package/dist/DocumentLayout-B7afHRMr.js +0 -4909
  166. package/dist/DocumentLogotype-sqI51wvM.js +0 -87
  167. package/dist/DocumentVoided-TahdTSMn.js +0 -25
  168. package/dist/EmbedInput-BY-wHSfc.js +0 -113
  169. package/dist/EmbedSettings-8pfjk4NP.js +0 -72
  170. package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
  171. package/dist/FilePreviewModal-CcEinEFg.js +0 -81
  172. package/dist/Flag-PJKrghi9.js +0 -114
  173. package/dist/HeaderSettings-BqczIOsG.js +0 -392
  174. package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
  175. package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
  176. package/dist/Index-6b5VBKE-.js +0 -107
  177. package/dist/Index-B4pRJnbw.js +0 -84
  178. package/dist/Index-B69f8qgZ.js +0 -62
  179. package/dist/Index-B79YN9RO.js +0 -25
  180. package/dist/Index-BBrlPoe8.js +0 -58
  181. package/dist/Index-BXfWJCuq.js +0 -52
  182. package/dist/Index-Bd76vb37.js +0 -55
  183. package/dist/Index-BmbtQO5F.js +0 -150
  184. package/dist/Index-ByV_kJaH.js +0 -77
  185. package/dist/Index-CDV5rhWS.js +0 -49
  186. package/dist/Index-CIx4OOK-.js +0 -144
  187. package/dist/Index-CL1OWLt6.js +0 -223
  188. package/dist/Index-Caow0eZu.js +0 -31
  189. package/dist/Index-Cd3-3PEK.js +0 -2402
  190. package/dist/Index-CdpZBEKU.js +0 -98
  191. package/dist/Index-CmU3Sys-.js +0 -754
  192. package/dist/Index-CtRtgnpm.js +0 -32
  193. package/dist/Index-Cukkr33D.js +0 -140
  194. package/dist/Index-Cuqw0ios.js +0 -57
  195. package/dist/Index-Czm_WdqC.js +0 -25
  196. package/dist/Index-DNdYXHgr.js +0 -33
  197. package/dist/Index-DcuBxutp.js +0 -642
  198. package/dist/Index-DpWNWiyY.js +0 -291
  199. package/dist/Index-DzS1rZdF.js +0 -24
  200. package/dist/Index-N6s5pZxv.js +0 -26
  201. package/dist/Index-g_DNu4mt.js +0 -69
  202. package/dist/Index-mJ8F41GY.js +0 -154
  203. package/dist/Index-q7W9KA8m.js +0 -21
  204. package/dist/Index-rtzblZp4.js +0 -70
  205. package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
  206. package/dist/ManualPopover-CZrWiT-P.js +0 -58
  207. package/dist/MediaWrapper-D37qK4KR.js +0 -23
  208. package/dist/PackageGroup-Heo_s8ct.js +0 -699
  209. package/dist/PdfTerms-AB9tXAtU.js +0 -36
  210. package/dist/PdfViewer-CIVkvOBr.js +0 -373
  211. package/dist/PlainHtml-CPmIebjY.js +0 -20
  212. package/dist/PriceHeader-DhDAruwX.js +0 -339
  213. package/dist/SearchApi-BMgdaI4s.js +0 -161
  214. package/dist/Setup-VIaIV9uT.js +0 -50
  215. package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
  216. package/dist/ToggleBinding-CuwCeYpO.js +0 -38
  217. package/dist/UploadModal-BITcxG-J.js +0 -95
  218. package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
  219. package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
  220. package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
  221. package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
  222. package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
  223. package/dist/formValidationMixin-COkY8COk.js +0 -49
  224. package/dist/index-BFvjENMH.js +0 -81
  225. package/dist/index-BV2nGWay.js +0 -492
  226. package/dist/index-BgJ05dYc.js +0 -165
  227. package/dist/index-CMPAXxzs.js +0 -347
  228. package/dist/index-DNDjI5uI.js +0 -3916
  229. package/dist/index-aoff9oUi.js +0 -102
  230. package/dist/mapFormMixin-QbevCwJK.js +0 -72
  231. package/dist/omit-CTp9CXoU.js +0 -31
  232. package/dist/splitpanes-BHUVsCZF.js +0 -382
  233. package/dist/tinycolor-kTl0yxzz.js +0 -633
  234. package/dist/tippy.esm-sS5koDSU.js +0 -1799
  235. package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
  236. package/dist/vuex.esm-DKGl8mcw.js +0 -467
  237. package/public/favicon.ico +0 -0
  238. package/tsconfig.json +0 -26
  239. package/tsconfig.node.json +0 -10
  240. package/tsconfig.paths.json +0 -17
  241. package/vite.config.ts +0 -60
@@ -1,699 +0,0 @@
1
- import { m as g } from "./mapFormMixin-QbevCwJK.js";
2
- import { E as y } from "./ErrorCallout-Dsr8PNsU.js";
3
- import { am as f, an as v, w as _, n as d, ao as k, A as w, b as p, d as P, c as $ } from "./main-WKzC-Dnu.js";
4
- import { t as m } from "./tinycolor-kTl0yxzz.js";
5
- import { T as b } from "./DocTextEditor-CntS2Bd-.js";
6
- const x = {
7
- name: "ArticleItem",
8
- mixins: [g([])],
9
- props: {
10
- title: {
11
- type: String,
12
- required: !0
13
- },
14
- quantity: {
15
- type: Number,
16
- required: !0
17
- },
18
- unitType: {
19
- type: String,
20
- required: !0
21
- },
22
- articleNo: {
23
- type: String,
24
- default: null
25
- },
26
- houseWorkType: {
27
- type: String,
28
- default: null
29
- },
30
- price: {
31
- type: Number,
32
- default: 0
33
- },
34
- currency: {
35
- type: String,
36
- required: !0
37
- },
38
- vat: {
39
- type: Number,
40
- default: null
41
- },
42
- priceType: {
43
- type: String,
44
- required: !0
45
- },
46
- showPrice: {
47
- type: Boolean,
48
- default: !0
49
- },
50
- position: {
51
- type: Number,
52
- default: null
53
- },
54
- showPricesIncVat: {
55
- type: Boolean,
56
- required: !0
57
- },
58
- discount: {
59
- type: Number,
60
- default: null
61
- },
62
- discountType: {
63
- type: String,
64
- default: null
65
- },
66
- totalAmount: {
67
- type: Number,
68
- default: null
69
- }
70
- },
71
- docLang: f,
72
- computed: {
73
- fixQuantity() {
74
- return this.priceType === "openAcc" ? 1 : this.quantity;
75
- },
76
- showDetails() {
77
- return this.showPrice ? this.priceType === "openAcc" || this.priceType === "markup" || this.quantity !== 1 || this.unitType !== "unit" : !1;
78
- },
79
- calcPricePrefix() {
80
- return this.priceType === "approx" ? `${this._document.$t("approx")} ` : "";
81
- },
82
- unitPriceUnformatted() {
83
- let { price: i } = this;
84
- return this.priceType === "markup" || this.showPricesIncVat && (i *= (100 + this.vat) / 100), i;
85
- },
86
- atPrice() {
87
- if (!this.price || !this.showPrice || this.priceType === "openAcc" || this.priceType === "markup")
88
- return !1;
89
- let { price: i } = this;
90
- return this.showPricesIncVat && (i *= (100 + this.vat) / 100), this.priceFormat(i, {
91
- currency: this.currency,
92
- decimals: 2,
93
- hideZeroDecimals: !0
94
- });
95
- },
96
- totalPrice() {
97
- if (!this.price || !this.totalAmount)
98
- return "";
99
- let i = this.totalAmount;
100
- this.showPricesIncVat && this.priceType !== "markup" && (i *= (100 + this.vat) / 100);
101
- let e = "";
102
- return this.priceType === "openAcc" && (e = `/${v(this.unitType, {
103
- lng: this._document.language
104
- })}`, this.houseWorkType && (i *= {
105
- rot: 0.7,
106
- rut: 0.5,
107
- greenRot15: 0.85,
108
- greenRot20: 0.8,
109
- greenRot50: 0.5
110
- }[this.houseWorkType])), this.priceType === "markup" ? i = `${this.priceFormat(i, {
111
- suffix: !1,
112
- decimals: 2,
113
- currency: this.currency
114
- })} %` : i = this.priceFormat(i, {
115
- currency: this.currency,
116
- decimals: 2,
117
- hideZeroDecimals: !0
118
- }), this.calcPricePrefix + i + e;
119
- },
120
- discountLabels() {
121
- if (!this.discount)
122
- return "";
123
- const i = this.priceFormat(
124
- this.fixQuantity * this.unitPriceUnformatted,
125
- {
126
- currency: this.currency
127
- }
128
- );
129
- let e = "", t = "";
130
- return this.discountType === "percentage" ? (e = `<span style="color: red;">-${this.discount / 100}%</span>`, t = `<span style="text-decoration: line-through; font-weight: 400; padding-left: 0.75ch; opacity: 0.75;">${i}</span>`) : t = `<span style="text-decoration: line-through; color: red;">${i}</span>`, `<div style="font-size: calc(1em - 2px);">${e}${t}</div>`;
131
- }
132
- },
133
- methods: {
134
- articleUnitLabel: v,
135
- priceFormat: _
136
- }
137
- };
138
- var T = function() {
139
- var e = this, t = e._self._c;
140
- return t("div", { staticClass: "article-wrapper print-avoid-break-inside", class: {
141
- "no-border-top": e.position === 0
142
- } }, [t("div", { staticClass: "article-text" }, [t("div", { staticClass: "article-text-title hyphens-auto break-all" }, [e._v(e._s(e.title))]), e.showDetails ? t("div", { staticClass: "article-text-sub" }, [e.priceType === "openAcc" || e.priceType === "markup" ? t("div", [e._v(" " + e._s(e._document.$t(`price.${e.priceType}`)) + "  ")]) : e._e(), e.priceType !== "openAcc" && e.priceType !== "markup" ? t("div", [e._v(" " + e._s(e.fixQuantity) + " " + e._s(e.articleUnitLabel(e.unitType, { count: e.fixQuantity, lng: e._document.language, instance: e.$options.docLang })) + " ")]) : e._e(), e.atPrice ? t("svg", { staticStyle: { margin: "0 4px" }, attrs: { width: "6", height: "6", viewBox: "0 0 148 141", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M73.742787 92.65535l-34.444359 47.40859-18.607391-13.51906 34.060775-46.88064L0 61.8743 7.107391 40 62 57.83569V0h23v57.99346L140.378182 40l7.107391 21.8743-54.751812 17.78994 34.060775 46.88064-18.607391 13.51906-34.444358-47.40859z", fill: "#000", "fill-rule": "evenodd" } })]) : e._e(), e.atPrice ? t("div", [e._v(e._s(e.atPrice))]) : e._e()]) : e._e()]), t("div", { staticClass: "article-price" }, [e.showPrice ? [e.discount ? t("div", { domProps: { innerHTML: e._s(e.discountLabels) } }) : e._e(), t("div", [e._v(" " + e._s(e.totalPrice) + " ")])] : e._e(), e.houseWorkType ? t("div", { staticClass: "article-price-sub" }, [e.houseWorkType && e.priceType === "openAcc" ? [e._v(e._s(e._document.$t("deduction.afterType", { type: `${e.houseWorkType}_percentage` })))] : e.houseWorkType ? [e._v(e._s(e._document.$t("chapters.articleItem.eligibleForDeduction", { type: `${e.houseWorkType}_percentage` })))] : e._e()], 2) : e._e()], 2)]);
143
- }, S = [], V = /* @__PURE__ */ d(
144
- x,
145
- T,
146
- S,
147
- !1,
148
- null,
149
- "cf33c521"
150
- );
151
- const C = V.exports, I = {
152
- name: "ArticleList",
153
- components: {
154
- DocChapterArticleItem: C
155
- },
156
- mixins: [g([])],
157
- props: {
158
- articles: {
159
- type: Array,
160
- required: !0
161
- },
162
- showPrices: {
163
- type: Boolean,
164
- default: !0
165
- },
166
- showPricesIncVat: {
167
- type: Boolean,
168
- default: !0
169
- },
170
- parent: {
171
- type: String,
172
- default: ""
173
- },
174
- useVat: {
175
- type: Boolean,
176
- required: !0
177
- },
178
- vatType: {
179
- type: String,
180
- required: !0
181
- }
182
- },
183
- computed: {
184
- showVatToggle() {
185
- return this.useVat && (this.articles || []).some(({ vat: i }) => i !== null);
186
- }
187
- },
188
- methods: {
189
- articleHouseWorkType: k
190
- }
191
- };
192
- var A = function() {
193
- var e = this, t = e._self._c;
194
- return t("div", { staticClass: "article-list-wrapper" }, [t("div", { staticClass: "article-head" }, [t("div", [e._v(e._s(e._document.$t("chapters.articleList.title")))]), e.showPrices && e.showVatToggle ? t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e._document.$t("chapters.articleList.changeShowVatTooltip", {
195
- type: e._document.$t(`vat.${e.showPricesIncVat ? "exVat" : "incVat"}`, {
196
- thing: e._document.$t(`vat.${e.vatType}`)
197
- })
198
- }), expression: "\n _document.$t('chapters.articleList.changeShowVatTooltip', {\n type: _document.$t(`vat.${showPricesIncVat ? 'exVat' : 'incVat'}`, {\n thing: _document.$t(`vat.${vatType}`)\n })\n })\n " }], staticStyle: { "text-decoration": "underline", cursor: "pointer" }, on: { click: function(r) {
199
- return e.$emit("toggle-show-vat", !e.showPricesIncVat);
200
- } } }, [e._v(" " + e._s(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, { thing: e._document.$t(`vat.${e.vatType}`) })) + " ")]) : e._e()]), e._l(e.articles, function(r, o) {
201
- return t("DocChapterArticleItem", { key: o, attrs: { _document: e._document, title: r.name, quantity: r.quantity, unit: r.unit, "unit-type": r.unitType, "article-no": r.article_no, "house-work-type": e.articleHouseWorkType(r), price: e.showPrices ? r.price : null, currency: r.currency, vat: r.vat, "price-type": r.priceType, "show-price": r.showPrice, position: r.position, "show-prices-inc-vat": e.showPricesIncVat, discount: r.discount, "discount-type": r.discountType, "total-amount": r.totalAmount } });
202
- })], 2);
203
- }, F = [], D = /* @__PURE__ */ d(
204
- I,
205
- A,
206
- F,
207
- !1,
208
- null,
209
- "cb0dfa52"
210
- );
211
- const z = D.exports, B = {
212
- name: "PackageItem",
213
- i18nOptions: {
214
- namespaces: "PackageItem",
215
- messages: {
216
- en: {
217
- selectTooltip: "Only your clients can select options"
218
- },
219
- sv: {
220
- selectTooltip: "Enbart din kund kan välja ett paket"
221
- }
222
- }
223
- },
224
- components: {
225
- ArticleList: z,
226
- TextEditor: b
227
- },
228
- inject: {
229
- isPdf: {
230
- default: !1
231
- }
232
- },
233
- props: {
234
- workPackage: {
235
- type: Object,
236
- required: !0
237
- },
238
- type: {
239
- type: String,
240
- required: !0
241
- },
242
- canToggle: {
243
- type: Boolean,
244
- default: !1
245
- },
246
- isPreview: {
247
- type: Boolean,
248
- default: !1
249
- },
250
- showToggle: {
251
- type: Boolean,
252
- default: !1
253
- },
254
- showPricesIncVat: {
255
- type: Boolean,
256
- default: !0
257
- },
258
- headingColor: {
259
- type: String,
260
- default: "#03f"
261
- },
262
- _document: {
263
- type: Object,
264
- default: null
265
- }
266
- },
267
- data() {
268
- return {
269
- internalShowDetails: !1,
270
- tinycolor: m
271
- };
272
- },
273
- computed: {
274
- prices() {
275
- return this.workPackage.prices;
276
- },
277
- totalBeforeDiscount() {
278
- return (this.workPackage.articles || []).reduce((i, e) => {
279
- const t = e.priceType === "openAcc" ? 1 : e.quantity;
280
- let { price: r } = e;
281
- return this.showPricesIncVat && e.priceType !== "markup" && (r *= (100 + e.vat) / 100), i + t * r;
282
- }, 0);
283
- },
284
- showDetails: {
285
- get() {
286
- return this.type === "single" || this.workPackage.isSelected && !this.workPackage.toggable ? !0 : this.internalShowDetails || this.isPdf;
287
- },
288
- set(i) {
289
- this.internalShowDetails = i;
290
- }
291
- },
292
- description() {
293
- const i = this._document ? this._document._doc : {};
294
- return w(this.workPackage.data.description, i);
295
- },
296
- useVat() {
297
- return this._document ? this._document.useVat : !1;
298
- },
299
- vatType() {
300
- return this._document ? this._document.vatType : "vat";
301
- }
302
- },
303
- methods: {
304
- priceFormat(i, e = {}) {
305
- return _(i, {
306
- currency: this.prices.currency,
307
- decimals: 2,
308
- hideZeroDecimals: !0,
309
- ...e
310
- });
311
- }
312
- }
313
- };
314
- var M = function() {
315
- var e = this, t = e._self._c;
316
- return t("div", { staticClass: "package-container font-inter", class: {
317
- "single-package": e.type === "single" || e.workPackage.isSelected && !e.workPackage.toggable
318
- }, style: {
319
- ...e.workPackage.isSelected && {
320
- boxShadow: `0 0 0 2px ${e.headingColor}`
321
- }
322
- } }, [t("div", { staticClass: "top-container" }, [e.workPackage.data.name ? t("div", { staticStyle: { "font-weight": "800", "font-size": "calc(calc(1 * var(--rem)) + 4px)", "margin-bottom": "calc(0.5 * var(--rem))" } }, [e._v(" " + e._s(e.workPackage.data.name) + " ")]) : e._e(), t("div", [e.description ? t("TextEditor", { staticStyle: { "margin-bottom": "1em" }, attrs: { value: e.description } }) : e._e()], 1)]), t("Animation", [t("ArticleList", { directives: [{ name: "show", rawName: "v-show", value: e.showDetails && e.workPackage.articles.length, expression: "showDetails && workPackage.articles.length" }], staticClass: "articles-container", attrs: { _document: e._document, articles: e.workPackage.articles, "show-prices-inc-vat": e.showPricesIncVat, "use-vat": e.useVat, "vat-type": e.vatType, parent: "packageGroup" }, on: { "toggle-show-vat": function(r) {
323
- return e.$emit("toggle-show-vat", r);
324
- } } })], 1), e.type !== "single" && (e.workPackage.toggable || e.isPreview) && (e.prices.total || e.prices.type === "openAcc") ? t("div", { staticClass: "flex w-full justify-end", staticStyle: { "margin-top": "calc(3 * var(--rem))" } }, [t("div", { staticStyle: { padding: "calc(0.75 * var(--rem)) calc(1 * var(--rem))", "text-align": "right" } }, [e.prices.helpers.discount ? t("div", { staticClass: "price-total", staticStyle: { color: "red", "text-decoration": "line-through", "font-size": "16px", "font-weight": "600" } }, [e._v(" " + e._s(e.priceFormat(e.showPricesIncVat ? e.totalBeforeDiscount : e.prices.subTotal + e.prices.helpers.discount)) + " ")]) : e._e(), e.prices.type === "openAcc" ? [t("div", { staticStyle: { "line-height": "1.2", "font-size": "13px" } }, [e._v(" " + e._s(e._document.$t("price.pricing")) + " ")]), t("div", { staticClass: "price-total", staticStyle: { padding: "2px 0 3px 0" } }, [e._v(" " + e._s(e._document.$t("price.openAccPrice")) + " ")])] : [t("div", { staticClass: "price-total" }, [e.type === "checkbox" ? t("span", { staticClass: "primary-text-color", staticStyle: { "font-weight": "900" } }, [e._v("+")]) : e._e(), e._v(" " + e._s(e.priceFormat(e.showPricesIncVat ? e.prices.total : e.prices.subTotal)) + " ")]), e.useVat ? t("div", { staticStyle: { "line-height": "1.2", "font-size": "13px", padding: "2px 0 3px 0" } }, [e._v(" " + e._s(e._document.$t("price.price").capitalize()) + " " + e._s(e._document.$t(`vat.${e.showPricesIncVat ? "incVat" : "exVat"}`, { thing: e._document.$t(`vat.${e.vatType}`) })) + " ")]) : e._e()]], 2)]) : e._e(), e.showToggle ? t("div", { staticClass: "flex w-full items-center justify-end", staticStyle: { "background-color": "hsl(215, 10%, 95%)" } }, [e.isPdf ? e._e() : [t("CButton", { staticClass: "package-button", attrs: { pattern: "tertiary", type: "text", icon: e.showDetails ? "arrow-up" : "arrow-down", "icon-props": { size: 20 } }, on: { click: function(r) {
325
- e.showDetails = !e.showDetails;
326
- } } }, [e._v(" " + e._s(e._document.$t("show", { thing: e._document.$t(`${e.showDetails ? "less" : "detail_plural"}`) })) + " ")]), e.canToggle || e.isPreview ? t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.isPreview && {
327
- content: e.$t("selectTooltip"),
328
- offset: 5
329
- }, expression: `
330
- isPreview && {
331
- content: $t('selectTooltip'),
332
- offset: 5
333
- }
334
- ` }], staticClass: "package-button", class: { "is-disabled": e.isPreview }, style: {
335
- backgroundColor: e.headingColor,
336
- color: e.tinycolor.readability(e.headingColor, "#FFF") > 2.2 ? "#FFF" : "#000"
337
- }, attrs: { type: "text" }, on: { click: function(r) {
338
- e.canToggle && e.$emit("toggle", e.workPackage.packageId);
339
- } } }, [e.workPackage.isSelected ? [t("svg", { staticStyle: { "margin-right": "calc(0.5 * var(--rem))" }, attrs: { viewBox: "0 0 24 24", width: "18", height: "18", stroke: "currentColor", "stroke-width": "3.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("polyline", { attrs: { points: "20 6 9 17 4 12" } })]), e._v(" " + e._s(e._document.$t("chapters.packageItem.selected")) + " ")] : [e._v(" " + e._s(e._document.$t(`chapters.packageItem.${e.type === "radio" ? "select" : "add"}`)) + " ")]], 2) : e._e()]], 2) : e._e()], 1);
340
- }, W = [], O = /* @__PURE__ */ d(
341
- B,
342
- M,
343
- W,
344
- !1,
345
- null,
346
- "597f71fb"
347
- );
348
- const Z = O.exports, q = {
349
- name: "PackagePricingSummary",
350
- props: {
351
- // PackageGroup.prices (format: calcPrices of one group)
352
- prices: {
353
- type: Object,
354
- default: () => ({ region: {} })
355
- },
356
- showPrices: {
357
- type: Boolean,
358
- default: !0
359
- },
360
- _document: {
361
- type: Object,
362
- default: () => ({})
363
- },
364
- primaryColor: {
365
- type: String,
366
- default: "#03f"
367
- },
368
- placeholder: {
369
- type: Boolean,
370
- default: !1
371
- },
372
- showPricesIncVat: {
373
- type: Boolean,
374
- default: !0
375
- }
376
- },
377
- computed: {
378
- blocks() {
379
- const {
380
- type: i,
381
- total: e,
382
- maxTotal: t,
383
- subTotal: r,
384
- taxAmount: o,
385
- roundingAmount: s,
386
- currency: a
387
- } = this.prices, c = [];
388
- if (!a)
389
- return c;
390
- const n = {
391
- title: this._document.$t("chapters.pricingSummary.blocks.price"),
392
- subTitle: this._document.$t("chapters.pricingSummary.blocks.summary")
393
- }, u = this.getPricingInfo({
394
- includeFixedCosts: !this.isOpenAccPricing
395
- });
396
- let l = this.hasDeductions ? this._document.$t(
397
- "chapters.pricingSummary.blocks.deductionSubValue",
398
- {
399
- price: this.priceFormat(r + o + s, {
400
- currency: a,
401
- decimals: 2,
402
- hideZeroDecimals: !0
403
- })
404
- }
405
- ) : null, h = e;
406
- return this.prices.useVat && !this.showPricesIncVat && !this.hasDeductions && (h = r, l = `${this.priceFormat(e, {
407
- currency: a,
408
- decimals: 2,
409
- hideZeroDecimals: !0
410
- })} ${this._document.$t("vat.incVat")}`), ["fixed", "approx"].includes(i) && c.push({
411
- header: n,
412
- items: u,
413
- footer: {
414
- title: this._document.$t("chapters.pricingSummary.blocks.total"),
415
- subTitle: i === "approx" ? this._document.$t("chapters.pricingSummary.blocks.approx") : null,
416
- value: this.priceFormat(h, {
417
- currency: a,
418
- decimals: 2,
419
- hideZeroDecimals: !0
420
- }),
421
- subValue: l
422
- }
423
- }), this.isOpenAccPricing && (c.push({
424
- header: n,
425
- items: u,
426
- footer: t ? {
427
- title: this._document.$t(
428
- "chapters.pricingSummary.blocks.maxPrice"
429
- ),
430
- value: this.priceFormat(this.calcMaxPrice, {
431
- currency: a,
432
- decimals: 2,
433
- hideZeroDecimals: !0
434
- })
435
- } : null
436
- }), e && c.push({
437
- header: {
438
- subTitle: this._document.$t(
439
- "chapters.pricingSummary.blocks.subTitleArticles"
440
- )
441
- },
442
- items: this.getPricingInfo({
443
- includeFixedCosts: !0,
444
- showType: !1
445
- }),
446
- footer: {
447
- title: this._document.$t("chapters.pricingSummary.blocks.total"),
448
- value: this.priceFormat(h, {
449
- currency: a,
450
- decimals: 2,
451
- hideZeroDecimals: !0
452
- }),
453
- subValue: l
454
- }
455
- })), c;
456
- },
457
- isOpenAccPricing() {
458
- return ["openAcc", "openAccMaxPrice"].includes(this.prices.type);
459
- },
460
- showIncVat() {
461
- return p(this._document, "prices.helpers.isIndivid", !0);
462
- },
463
- calcMaxPrice() {
464
- return this.prices.maxTotal ? this.showIncVat ? this.prices.maxTotal * 1.25 : this.prices.maxTotal : null;
465
- },
466
- showPricingCard() {
467
- const { subTotal: i, total: e, maxTotal: t, currency: r } = this.prices;
468
- return r && (this.isOpenAccPricing || this.placeholder || i || e || t);
469
- },
470
- hasDeductions() {
471
- return this.prices.region && this.prices.region.houseWorkAmount;
472
- },
473
- vatType() {
474
- return p(this, "_document.vatType");
475
- }
476
- },
477
- methods: {
478
- priceFormat(i, e = { showZero: !0 }) {
479
- return _(i, e);
480
- },
481
- deductionText(i = !0) {
482
- let e = "";
483
- return this.hasDeductions && (e = this._document.$t(
484
- "chapters.pricingSummary.blocks.typeDeduction",
485
- { type: `${this.prices.region.houseWorkType}_percentage` }
486
- )), i || (e = e.charAt(0).toLowerCase() + e.slice(1)), e;
487
- },
488
- getPricingInfo({ includeFixedCosts: i = !0, showType: e = !0 }) {
489
- const {
490
- type: t,
491
- subTotal: r,
492
- roundingAmount: o,
493
- taxAmount: s,
494
- maxTotal: a,
495
- region: c = {},
496
- currency: n,
497
- helpers: { discount: u }
498
- } = this.prices;
499
- let l = [];
500
- return c.country === "sweden" && (t === "openAccMaxPrice" && a && !i && (l.push({
501
- label: this._document.$t(
502
- "chapters.pricingSummary.blocks.maxPriceVat",
503
- { vat: this._document.$t("vat.exVat") }
504
- ),
505
- value: this.priceFormat(a, {
506
- currency: n,
507
- decimals: 2,
508
- hideZeroDecimals: !0
509
- })
510
- }), c.reverseVat || l.push({
511
- label: this._document.$t(
512
- "chapters.pricingSummary.blocks.maxPriceVat",
513
- { vat: this._document.$t("vat.incVat") }
514
- ),
515
- value: this.priceFormat(a * 1.25, {
516
- currency: n,
517
- decimals: 2,
518
- hideZeroDecimals: !0
519
- })
520
- })), c.houseWorkType && c.houseWorkAmount && i && l.push({
521
- label: this._document.$t("deduction.type", {
522
- type: `${c.houseWorkType}${c.houseWorkManualAmount === null ? "_percentage" : ""}`
523
- }),
524
- value: this.priceFormat(-1 * c.houseWorkAmount, {
525
- currency: n,
526
- decimals: 2,
527
- hideZeroDecimals: !0
528
- })
529
- })), i && (l = [
530
- {
531
- label: this._document.$t("chapters.pricingSummary.blocks.net"),
532
- value: this.priceFormat(r, {
533
- currency: n,
534
- decimals: 2,
535
- hideZeroDecimals: !0
536
- })
537
- },
538
- ...this.prices.useVat ? [
539
- {
540
- label: this._document.$t(`vat.${this.vatType}`).capitalize(),
541
- value: this.priceFormat(c.reverseVat ? 0 : s, {
542
- showZero: !0,
543
- currency: n,
544
- decimals: 2,
545
- hideZeroDecimals: !0
546
- })
547
- }
548
- ] : [],
549
- ...l,
550
- ...this.prices.rounding.enabled && this.prices.rounding.show ? [
551
- {
552
- label: this._document.$t(
553
- "chapters.pricingSummary.blocks.rounding"
554
- ),
555
- value: this.priceFormat(o, {
556
- decimals: 2,
557
- showZero: !0,
558
- currency: n,
559
- hideZeroDecimals: !0
560
- })
561
- }
562
- ] : [],
563
- ...this.prices.helpers.discount ? [
564
- {
565
- label: this._document.$t(
566
- "chapters.pricingSummary.blocks.discount"
567
- ),
568
- value: `-${this.priceFormat(u, {
569
- decimals: 2,
570
- showZero: !0,
571
- currency: n,
572
- hideZeroDecimals: !0
573
- })}`
574
- }
575
- ] : []
576
- ]), e && t !== "fixed" && (l = [
577
- {
578
- label: this._document.$t("price.pricing").capitalize(),
579
- value: this._document.$t(`price.${t}`)
580
- },
581
- ...l
582
- ]), l;
583
- }
584
- }
585
- };
586
- var L = function() {
587
- var e = this, t = e._self._c;
588
- return e._document.readPrices ? t("div", { staticClass: "font-inter", staticStyle: { "margin-top": "calc(2 * var(--rem))", "margin-bottom": "calc(2 * var(--rem))", position: "relative" }, attrs: { id: "price" } }, [e.showPricingCard ? t("div", { staticClass: "pricing-container", class: { faded: e.placeholder } }, [e._l(e.blocks, function({ header: r, items: o, footer: s }, a) {
589
- return t("div", { key: a, staticClass: "block-container print-avoid-break-inside", class: { first: a === 0 } }, [t("div", { staticClass: "block-header" }, [r.title ? t("div", { staticStyle: { "font-weight": "800" } }, [e._v(" " + e._s(r.title) + " ")]) : e._e(), r.subTitle ? t("div", { staticStyle: { "font-size": "16px", "margin-left": "0.5em" } }, [e._v(" " + e._s(r.subTitle) + " ")]) : e._e()]), o.length || s ? t("div", { staticClass: "block-body" }, [e._l(o, function({ label: c, value: n }, u) {
590
- return t("div", { key: `item-${u}-${a}`, staticClass: "block-body-item", class: a === 0 && "primary-light-background", style: a !== 0 && { borderBottom: "1px solid hsl(210, 15%, 85%)" } }, [t("div", [e._v(e._s(c))]), t("div", [e._v(e._s(n))])]);
591
- }), s ? t("div", { staticClass: "block-body-footer", style: { "border-top": `4px solid ${e.primaryColor}` } }, [t("div", [e._v(" " + e._s(s.title) + " "), s.subTitle ? t("div", { staticStyle: { "font-weight": "500", "font-size": "calc(1em - 2px)" } }, [e._v(" " + e._s(s.subTitle) + " ")]) : e._e()]), t("div", { staticClass: "text-right" }, [t("div", [e._v(e._s(s.value))]), s.subValue ? t("div", { staticClass: "block-body-footer-hint" }, [e._v(" " + e._s(s.subValue) + " ")]) : e._e()])]) : e._e()], 2) : e._e()]);
592
- }), e.prices.region && e.prices.region.reverseVat ? [t("div", { staticClass: "terms-text" }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.reverseVat")) + " ")])] : e._e(), e.prices.region && e.prices.region.houseWorkType ? t("div", { staticClass: "terms-text", attrs: { id: "villkor-avdrag" } }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.houseWork", { type: `${e.prices.region.houseWorkType}_percentage` })) + " ")]) : e._e(), e.prices.type === "approx" && e.prices.region && e.prices.region.houseWorkType === "rot" ? t("div", { staticClass: "terms-text" }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.terms.houseWorkApprox")) + " ")]) : e._e()], 2) : e._e(), e.placeholder ? t("div", { staticClass: "flex w-full flex-col items-center justify-center", staticStyle: { position: "absolute", top: "calc(1 * var(--rem))", left: "50%", transform: "translate(-50%, 0%)", "background-color": "white", width: "350px", "max-width": "90%", "border-radius": "3px", padding: "calc(2 * var(--rem))", "text-align": "center", "font-size": "16px" } }, [t("svg", { attrs: { width: "200", height: "100", viewBox: "0 0 418 211", xmlns: "http://www.w3.org/2000/svg" } }, [t("defs", [t("filter", { attrs: { id: "a", x: "-30.7%", y: "-26.2%", width: "160%", height: "155%", filterUnits: "objectBoundingBox" } }, [t("feOffset", { attrs: { dy: "3", in: "SourceAlpha", result: "shadowOffsetOuter1" } }), t("feGaussianBlur", { attrs: { stdDeviation: "1", in: "shadowOffsetOuter1", result: "shadowBlurOuter1" } }), t("feColorMatrix", { attrs: { values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0", in: "shadowBlurOuter1", result: "shadowMatrixOuter1" } }), t("feMerge", [t("feMergeNode", { attrs: { in: "shadowMatrixOuter1" } }), t("feMergeNode", { attrs: { in: "SourceGraphic" } })], 1)], 1)]), t("g", { attrs: { fill: "none", "fill-rule": "evenodd" } }, [t("path", { attrs: { stroke: "#E4E4E4", "stroke-width": "3", d: "M1.5 1.5h415v187H1.5z" } }), t("path", { attrs: { fill: e.primaryColor, "fill-rule": "nonzero", d: "M282 139h136v51H282z" } }), t("g", { attrs: { filter: "url(#a)", transform: "translate(365.5 165)" } }, [t("path", { attrs: { d: "M8.2 30.7c-.7-.9-1.6-2.7-3.1-5-.9-1.3-3-3.6-3.7-4.8a3.3 3.3 0 013.2-5c1.3.2 2.5.8 3.4 1.8a16 16 0 011.8 2l.9 1.2c.5.6.8 1.2.5.3-.1-1.3-.4-3.3-.9-5.2l-.7-2.8c-.3-1-.4-2-.8-3.1l-.7-3.7a7 7 0 01.7-4.6 3 3 0 013.2-.6c1.1.8 2 2 2.4 3.3.6 1.6 1 3.3 1.3 5 .4 2.5 1.2 6.1 1.2 6.9 0-1-.2-2.9 0-3.8.1-.9.8-1.6 1.7-2a5 5 0 012.3-.1c.7.1 1.4.6 1.9 1.2.6 1.5.9 3 1 4.6 0-1.4.2-2.7.6-4 .4-.6 1-1 1.8-1.3a7 7 0 012.4 0c.7.3 1.3.7 1.8 1.3.5 1.3.8 2.7.9 4.1 0 .4.2-1 .7-1.8a2.5 2.5 0 114.8 1.6v5.6c-.1 1.5-.3 3-.6 4.4-.5 1.2-1 2.4-1.8 3.6a18 18 0 00-3 4.5 10 10 0 000 4.8h-3c-1-.2-2.2-2.1-2.5-2.7a1 1 0 00-1.7 0c-.6 1-1.8 2.6-2.6 2.8h-7.9s.5-2.6-.6-3.5l-2.8-2.6-2.1-2.4z", fill: "#FFF", "fill-rule": "nonzero" } }), t("path", { attrs: { d: "M8.2 30.7c-.7-.9-1.6-2.7-3.1-5-.9-1.3-3-3.6-3.7-4.8a3.3 3.3 0 013.2-5c1.3.2 2.5.8 3.4 1.8a16 16 0 011.8 2l.9 1.2c.5.6.8 1.2.5.3-.1-1.3-.4-3.3-.9-5.2l-.7-2.8c-.3-1-.4-2-.8-3.1l-.7-3.7a7 7 0 01.7-4.6 3 3 0 013.2-.6c1.1.8 2 2 2.4 3.3.6 1.6 1 3.3 1.3 5 .4 2.5 1.2 6.1 1.2 6.9 0-1-.2-2.9 0-3.8.1-.9.8-1.6 1.7-2a5 5 0 012.3-.1c.7.1 1.4.6 1.9 1.2.6 1.5.9 3 1 4.6 0-1.4.2-2.7.6-4 .4-.6 1-1 1.8-1.3a7 7 0 012.4 0c.7.3 1.3.7 1.8 1.3.5 1.3.8 2.7.9 4.1 0 .4.2-1 .7-1.8a2.5 2.5 0 114.8 1.6v5.6c-.1 1.5-.3 3-.6 4.4-.5 1.2-1 2.4-1.8 3.6a18 18 0 00-3 4.5 10 10 0 000 4.8h-3c-1-.2-2.2-2.1-2.5-2.7a1 1 0 00-1.7 0c-.6 1-1.8 2.6-2.6 2.8h-7.9s.5-2.6-.6-3.5l-2.8-2.6-2.1-2.4z", stroke: "#000", "stroke-width": "1.9", "stroke-linecap": "round", "stroke-linejoin": "round" } }), t("path", { attrs: { d: "M29.4 32v-8.6a1 1 0 00-1.9 0v8.7a1 1 0 001.9 0zM24.4 32v-8.6a1 1 0 00-1.9 0v8.7a1 1 0 002 0zM17.5 23.4v8.7a1 1 0 102 0l-.1-8.7a1 1 0 10-1.9 0z", fill: "#000", "fill-rule": "nonzero" } })]), t("text", { attrs: { "font-family": "Inter-Regular, Inter", "font-size": "24", fill: "#FFF" } }, [t("tspan", { attrs: { x: "332.4", y: "173" } }, [e._v(e._s(e._document.$t("select")))])]), t("path", { attrs: { fill: "#E4E4E4", "fill-rule": "nonzero", d: "M28 27h124v24H28zM28 64h355v11H28zM28 82h355v12H28zM28 103h178v12H28z" } })])]), t("div", { staticStyle: { "padding-top": "1em", "font-weight": "600", "font-size": "18px" } }, [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.placeholder.title")) + " ")]), t("div", [e._v(" " + e._s(e._document.$t("chapters.pricingSummary.placeholder.description"))), t("span", { staticStyle: { "font-weight": "600" } }, [e._v(e._s(e._document.$t("chapters.pricingSummary.placeholder.descriptionBold")))]), e._v(". ")])]) : e._e()]) : e._e();
593
- }, E = [], j = /* @__PURE__ */ d(
594
- q,
595
- L,
596
- E,
597
- !1,
598
- null,
599
- "a3ec6611"
600
- );
601
- const G = j.exports, N = {
602
- name: "PackageGroup",
603
- components: {
604
- PackageItem: Z,
605
- PackagePricingSummary: G,
606
- ErrorCallout: y
607
- },
608
- mixins: [
609
- g(["type", "packages", "hideGroupPrice"], { useEmit: !1 })
610
- ],
611
- props: {
612
- validator: {
613
- type: Object,
614
- default: () => ({})
615
- }
616
- },
617
- data() {
618
- return {
619
- showPricesIncVat: !0
620
- };
621
- },
622
- computed: {
623
- prices() {
624
- return (this._document.packageGroups.getPackageGroupUniqId(
625
- this._value.groupId
626
- ) || {}).prices || {};
627
- },
628
- showToggle() {
629
- return this.type !== "single";
630
- },
631
- canToggle() {
632
- const { hasAnswers: i } = this._document, { hasAnswered: e, canAnswer: t } = this._document.answerActions || {};
633
- return !i && this.type !== "single" && !e && t;
634
- },
635
- fixedPackages() {
636
- return this.packages.filter((i) => !i.toggable && i.isSelected);
637
- },
638
- toggablePackages() {
639
- return this.packages.filter((i) => !(!i.toggable && i.isSelected));
640
- },
641
- primaryColor() {
642
- let i = p(this, '_document.data.css[".chapter"]["--accentColor"]') || p(this, "_document.theme.headingColor");
643
- function e() {
644
- m.readability(i, "#fff") < 1.8 && (i = m(i).darken(5).toString(), e());
645
- }
646
- return e(), i;
647
- },
648
- selectedPackages() {
649
- return this.packages.filter(({ isSelected: i }) => i);
650
- }
651
- },
652
- created() {
653
- const {
654
- isPreview: i,
655
- setPricesIncVat: e = null,
656
- useVat: t = P[$.brand].defaultRegion === "SE"
657
- } = p(this, "_document", {});
658
- i && e !== null ? this.showPricesIncVat = e : this.showPricesIncVat = p(this, "_document.prices.helpers.isIndivid", !0) && t;
659
- },
660
- methods: {
661
- onToggle(i) {
662
- if (this.type === "single")
663
- return;
664
- const e = this.packages.findIndex(({ packageId: t }) => t === i);
665
- e === -1 || this.type === "radio" && this.packages[e].isSelected || (this.setField({
666
- key: `${this._value.packages}[${e}].isSelected`,
667
- value: !this.packages[e].isSelected
668
- }), this.type === "radio" && this.packages.forEach((t, r) => {
669
- r !== e && this.setField({
670
- key: `${this._value.packages}[${r}].isSelected`,
671
- value: !1
672
- });
673
- }));
674
- }
675
- }
676
- };
677
- var R = function() {
678
- var e = this, t = e._self._c;
679
- return t("div", { staticStyle: { position: "relative" } }, [e._l(e.fixedPackages, function(r, o) {
680
- return t("PackageItem", { key: o, attrs: { type: e.type, "work-package": e._document.packageGroups.getPackageById(r.packageId), "heading-color": e.primaryColor, "can-toggle": e.canToggle, "show-prices-inc-vat": e.showPricesIncVat, _document: e._document }, on: { toggle: e.onToggle, "toggle-show-vat": function(s) {
681
- e.showPricesIncVat = s;
682
- } } });
683
- }), e.toggablePackages.length ? t("div", [e.fixedPackages.length && e.toggablePackages.length ? t("div", { staticStyle: { padding: "calc(0.5 * var(--rem))", "line-height": "2", color: "hsla(0, 0%, 0%, 0.65)", "font-weight": "600", "font-size": "calc(1 * var(--rem))" } }, [e._v(" " + e._s(e._document.$t("chapters.packageGroup.selectableOptions")) + " ")]) : e._e(), e._l(e.toggablePackages, function(r, o) {
684
- return t("PackageItem", { key: `fixed-${o}`, attrs: { "work-package": e._document.packageGroups.getPackageById(r.packageId), type: e.type, "heading-color": e.primaryColor, "show-toggle": e.showToggle, "can-toggle": e.canToggle, "is-preview": e._document.isPreview, "show-prices-inc-vat": e.showPricesIncVat, _document: e._document }, on: { toggle: e.onToggle, "toggle-show-vat": function(s) {
685
- e.showPricesIncVat = s;
686
- } } });
687
- })], 2) : e._e(), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))" }, attrs: { message: e._document.$t("chapters.packageGroup.errorCallout") } }) : e._e(), e.hideGroupPrice ? e._e() : t("PackagePricingSummary", { attrs: { prices: e.prices, _document: e._document, "show-prices-inc-vat": e.showPricesIncVat, "primary-color": e.primaryColor, placeholder: !e.selectedPackages.length } })], 2);
688
- }, H = [], U = /* @__PURE__ */ d(
689
- N,
690
- R,
691
- H,
692
- !1,
693
- null,
694
- "f50d442e"
695
- );
696
- const ee = U.exports;
697
- export {
698
- ee as default
699
- };