@cling-se/widget 0.0.8 → 0.0.9

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 (100) hide show
  1. package/dist/{DocFormSend.a1382bdd.js → DocFormSend.af229ffe.js} +1 -1
  2. package/dist/{index.a8f56046.js → index.024714ae.js} +1 -1
  3. package/dist/{index.0265c516.js → index.04356208.js} +1 -1
  4. package/dist/{index.79b10c9a.js → index.0aa67127.js} +1 -1
  5. package/dist/{index.9330027f.js → index.0bdc6c44.js} +1 -1
  6. package/dist/{index.bf041dfa.js → index.0ddef7f7.js} +1 -1
  7. package/dist/{index.ab2ee999.js → index.101527a8.js} +1 -1
  8. package/dist/{index.a8585463.js → index.101a386a.js} +1 -1
  9. package/dist/{index.0e3df7da.js → index.16aae745.js} +1 -1
  10. package/dist/{index.ba3d44e0.js → index.16c891a2.js} +1 -1
  11. package/dist/{index.07278795.js → index.16ff098b.js} +1 -1
  12. package/dist/{index.d495d0eb.js → index.1796ac5e.js} +1 -1
  13. package/dist/{index.7a977934.js → index.18e64992.js} +1 -1
  14. package/dist/{index.13190c06.js → index.21dcabd5.js} +1 -1
  15. package/dist/{index.ab49c3fc.js → index.236dbf52.js} +1 -1
  16. package/dist/{index.c4e3fbb3.js → index.30e480e1.js} +1 -1
  17. package/dist/{index.51065c0c.js → index.330a88e6.js} +1 -1
  18. package/dist/{index.9cb48c9a.js → index.38545386.js} +1 -1
  19. package/dist/{index.c1fcb9c8.js → index.3a6a6d8b.js} +1 -1
  20. package/dist/{index.093afa2a.js → index.3d2aecde.js} +1 -1
  21. package/dist/{index.dd92c2bb.js → index.3ef0ccad.js} +1 -1
  22. package/dist/{index.cd00072e.js → index.3fedc6ea.js} +1 -1
  23. package/dist/{index.a6a0aacf.js → index.431256f2.js} +1 -1
  24. package/dist/{index.818f2d4f.js → index.46a0bba2.js} +1 -1
  25. package/dist/{index.162e7938.js → index.49a1ba66.js} +1 -1
  26. package/dist/{index.80c919f0.js → index.4f7ba8fb.js} +1 -1
  27. package/dist/{index.4abbfa6e.js → index.519c5437.js} +1 -1
  28. package/dist/{index.ce768f9f.js → index.54db78ee.js} +1 -1
  29. package/dist/{index.9c8dfc6b.js → index.55682359.js} +1 -1
  30. package/dist/{index.5e216bc1.js → index.57db7bea.js} +1 -1
  31. package/dist/{index.659a3a47.js → index.588531a8.js} +1 -1
  32. package/dist/{index.88f87740.js → index.5ae6b23d.js} +1 -1
  33. package/dist/{index.d1f24df1.js → index.5aeec319.js} +1 -1
  34. package/dist/{index.768501b5.js → index.5afba447.js} +1 -1
  35. package/dist/{index.b6508bd0.js → index.5ea84fa7.js} +1 -1
  36. package/dist/{index.73c6d37f.js → index.60bfefbd.js} +1 -1
  37. package/dist/{index.0b2d87fc.js → index.616ef74b.js} +1 -1
  38. package/dist/{index.7fdee6e5.js → index.617404ef.js} +1 -1
  39. package/dist/{index.735af5e1.js → index.62abdbae.js} +1 -1
  40. package/dist/{index.f2c37d8f.js → index.634067e8.js} +1 -1
  41. package/dist/{index.76402a99.js → index.63c87185.js} +1 -1
  42. package/dist/{index.99f6053d.js → index.6e56f188.js} +1 -1
  43. package/dist/{index.c554377e.js → index.79c9f4b0.js} +1 -1
  44. package/dist/{index.00e0b436.js → index.7be70403.js} +1 -1
  45. package/dist/{index.34b9f899.js → index.85d1ef56.js} +1 -1
  46. package/dist/{index.f910fa0e.js → index.86efe720.js} +1 -1
  47. package/dist/{index.4050fc3a.js → index.87e33037.js} +1 -1
  48. package/dist/{index.17fa9fb1.js → index.8e4cf8fa.js} +1 -1
  49. package/dist/{index.334f804f.js → index.8e56799d.js} +1 -1
  50. package/dist/{index.f1bc2a92.js → index.8eb9d690.js} +1 -1
  51. package/dist/{index.6b8a87ae.js → index.905aa911.js} +1 -1
  52. package/dist/{index.fc5af48a.js → index.9430891b.js} +1 -1
  53. package/dist/{index.5cc5262d.js → index.96926c45.js} +1 -1
  54. package/dist/{index.43dc1631.js → index.98f61f05.js} +1 -1
  55. package/dist/{index.c2f22846.js → index.9ab80fb4.js} +1 -1
  56. package/dist/{index.59b216bf.js → index.9b99a0b1.js} +1 -1
  57. package/dist/{index.3da31443.js → index.9d0618bd.js} +1 -1
  58. package/dist/{index.d35109f8.js → index.a3112c09.js} +1 -1
  59. package/dist/{index.c356a3d9.js → index.a7d0e9ff.js} +1 -1
  60. package/dist/{index.8e445ff9.js → index.a828f4e9.js} +1 -1
  61. package/dist/{index.f7865e77.js → index.ab1b0e1d.js} +1 -1
  62. package/dist/{index.727201bc.js → index.ac46a6ce.js} +1 -1
  63. package/dist/{index.f29c2c95.js → index.ae7f6cae.js} +2 -2
  64. package/dist/{index.55cb50fa.js → index.af6e9cb3.js} +1 -1
  65. package/dist/{index.8d85a2c2.js → index.b02dcf35.js} +1 -1
  66. package/dist/{index.c5fc33d7.js → index.b6aff350.js} +1 -1
  67. package/dist/{index.a23f6540.js → index.bcdaffbd.js} +1 -1
  68. package/dist/{index.9a87d327.js → index.bd1c91e9.js} +1 -1
  69. package/dist/{index.8b7ac4dd.js → index.bd412419.js} +1 -1
  70. package/dist/{index.4fe41ffe.js → index.bd479ffd.js} +2 -2
  71. package/dist/{index.61bcc5cb.js → index.bd826cbc.js} +1 -1
  72. package/dist/{index.c772c2ba.js → index.be840bc9.js} +1 -1
  73. package/dist/{index.c33672c9.js → index.bea5728b.js} +1 -1
  74. package/dist/{index.7ca2ebb2.js → index.c3c36470.js} +1 -1
  75. package/dist/{index.458ccb8a.js → index.c449c086.js} +1 -1
  76. package/dist/{index.01a4b53a.js → index.c67d020d.js} +1 -1
  77. package/dist/{index.a8f14151.js → index.ca93833e.js} +1 -1
  78. package/dist/{index.abd1065c.js → index.cc9e8411.js} +1 -1
  79. package/dist/{index.38684601.js → index.cec3a46e.js} +1 -1
  80. package/dist/{index.527fd671.js → index.d0696cbb.js} +1 -1
  81. package/dist/{index.d10c5477.js → index.d0baa8ae.js} +1 -1
  82. package/dist/{index.476b7f6b.js → index.d2a19ffc.js} +1 -1
  83. package/dist/{index.4fddeac7.js → index.d45365e5.js} +1 -1
  84. package/dist/{index.f6a44469.js → index.d4ac91bf.js} +1 -1
  85. package/dist/{index.f77c1edc.js → index.d93d33c5.js} +1 -1
  86. package/dist/{index.a54c60cb.js → index.e4a05e6b.js} +1 -1
  87. package/dist/{index.5064c8a1.js → index.e4e62b6e.js} +1 -1
  88. package/dist/{index.221e820e.js → index.ebf5659e.js} +1 -1
  89. package/dist/{index.716ea6bf.js → index.eefd3dfe.js} +1 -1
  90. package/dist/{index.e1870423.js → index.f2586a11.js} +1 -1
  91. package/dist/{index.db3e9bab.js → index.f4d989a9.js} +1 -1
  92. package/dist/{index.f97321a1.js → index.f7bc98a2.js} +2 -2
  93. package/dist/{index.a69e9e58.js → index.f8cb8dac.js} +1 -1
  94. package/dist/{index.c3242456.js → index.fca37fd8.js} +1 -1
  95. package/dist/{index.a19082f5.js → index.fd5c9038.js} +1 -1
  96. package/dist/{main.ee1119c9.js → main.3d787203.js} +3 -3
  97. package/dist/main.es.js +4 -0
  98. package/dist/{index.umd.js → main.umd.js} +1 -1
  99. package/package.json +9 -1
  100. package/dist/index.es.js +0 -4
@@ -1,4 +1,4 @@
1
- import { E as z } from "./main.ee1119c9.js";
1
+ import { E as z } from "./main.3d787203.js";
2
2
  import { a as F, b as L, c as R, d as V } from "./index.eaf0a7c6.js";
3
3
  function E(a, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as D, a as E, c as O, d as F } from "./index.eaf0a7c6.js";
3
3
  function K(d, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as D } from "./main.ee1119c9.js";
1
+ import { E as D } from "./main.3d787203.js";
2
2
  import { b as O, a as k, d as z, c as F } from "./index.eaf0a7c6.js";
3
3
  function N(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as D, a as S, c as O, d as C } from "./index.eaf0a7c6.js";
3
3
  function E(i, a) {
4
4
  for (var e = 0; e < a.length; e++) {
@@ -1,4 +1,4 @@
1
- import { E as S } from "./main.ee1119c9.js";
1
+ import { E as S } from "./main.3d787203.js";
2
2
  import { b as k, a as O, d as C, c as F } from "./index.eaf0a7c6.js";
3
3
  function z(d, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as k } from "./main.ee1119c9.js";
1
+ import { E as k } from "./main.3d787203.js";
2
2
  import { b as O, a as z, c as F, d as C } from "./index.eaf0a7c6.js";
3
3
  function R(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as k } from "./main.ee1119c9.js";
1
+ import { E as k } from "./main.3d787203.js";
2
2
  import { b as O, a as R, c as z, d as F } from "./index.eaf0a7c6.js";
3
3
  function C(i, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as N, a as O, c as k, d as J } from "./index.eaf0a7c6.js";
3
3
  function C(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as A } from "./main.ee1119c9.js";
1
+ import { E as A } from "./main.3d787203.js";
2
2
  import { b as W, a as D, c as H, d as I } from "./index.eaf0a7c6.js";
3
3
  function E(d, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as j, a as D, c as H, d as O } from "./index.eaf0a7c6.js";
3
3
  function F(n, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,6 +1,6 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as k, a as D, c as F, d as O } from "./index.eaf0a7c6.js";
3
- import { d as S } from "./index.f7865e77.js";
3
+ import { d as S } from "./index.ab1b0e1d.js";
4
4
  import { i as z } from "./index.9a1c119f.js";
5
5
  function C(f, e) {
6
6
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { E as W } from "./main.ee1119c9.js";
1
+ import { E as W } from "./main.3d787203.js";
2
2
  import { b as j, a as D, c as O, d as A } from "./index.eaf0a7c6.js";
3
3
  function K(i, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { E as k } from "./main.ee1119c9.js";
1
+ import { E as k } from "./main.3d787203.js";
2
2
  import { b as O, a as z, c as F, d as R } from "./index.eaf0a7c6.js";
3
3
  function C(o, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { E as k } from "./main.ee1119c9.js";
1
+ import { E as k } from "./main.3d787203.js";
2
2
  import { b as O, a as z, c as F, d as H } from "./index.eaf0a7c6.js";
3
3
  function R(n, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -16352,7 +16352,7 @@ const Ml = {
16352
16352
  };
16353
16353
  async function IF(e) {
16354
16354
  try {
16355
- return Hj(/* @__PURE__ */ Object.assign({ "../../../node_modules/date-fns/locale/af/index.js": () => import("./index.80c919f0.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-DZ/index.js": () => import("./index.f6a44469.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-EG/index.js": () => import("./index.61bcc5cb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-MA/index.js": () => import("./index.c2f22846.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-SA/index.js": () => import("./index.7a977934.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-TN/index.js": () => import("./index.659a3a47.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar/index.js": () => import("./index.727201bc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/az/index.js": () => import("./index.ab2ee999.js").then((t) => t.i), "../../../node_modules/date-fns/locale/be-tarask/index.js": () => import("./index.f29c2c95.js").then((t) => t.i), "../../../node_modules/date-fns/locale/be/index.js": () => import("./index.f97321a1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bg/index.js": () => import("./index.458ccb8a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bn/index.js": () => import("./index.c554377e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bs/index.js": () => import("./index.735af5e1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ca/index.js": () => import("./index.73c6d37f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/cs/index.js": () => import("./index.334f804f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/cy/index.js": () => import("./index.0265c516.js").then((t) => t.i), "../../../node_modules/date-fns/locale/da/index.js": () => import("./index.f910fa0e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/de-AT/index.js": () => import("./index.d35109f8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/de/index.js": () => import("./index.768501b5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/el/index.js": () => import("./index.5064c8a1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-AU/index.js": () => import("./index.162e7938.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-CA/index.js": () => import("./index.13190c06.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-GB/index.js": () => import("./index.a8f56046.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IE/index.js": () => import("./index.7fdee6e5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IN/index.js": () => import("./index.527fd671.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-NZ/index.js": () => import("./index.8e445ff9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-US/index.js": () => import("./index.9a87d327.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-ZA/index.js": () => import("./index.a8f14151.js").then((t) => t.i), "../../../node_modules/date-fns/locale/eo/index.js": () => import("./index.9c8dfc6b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/es/index.js": () => import("./index.818f2d4f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/et/index.js": () => import("./index.07278795.js").then((t) => t.i), "../../../node_modules/date-fns/locale/eu/index.js": () => import("./index.c772c2ba.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fa-IR/index.js": () => import("./index.221e820e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fi/index.js": () => import("./index.db3e9bab.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CA/index.js": () => import("./index.6b8a87ae.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CH/index.js": () => import("./index.fc5af48a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr/index.js": () => import("./index.43dc1631.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fy/index.js": () => import("./index.4050fc3a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gd/index.js": () => import("./index.c5fc33d7.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gl/index.js": () => import("./index.55cb50fa.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gu/index.js": () => import("./index.00e0b436.js").then((t) => t.i), "../../../node_modules/date-fns/locale/he/index.js": () => import("./index.3da31443.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hi/index.js": () => import("./index.476b7f6b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hr/index.js": () => import("./index.c33672c9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ht/index.js": () => import("./index.a23f6540.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hu/index.js": () => import("./index.ba3d44e0.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hy/index.js": () => import("./index.a19082f5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/id/index.js": () => import("./index.a69e9e58.js").then((t) => t.i), "../../../node_modules/date-fns/locale/is/index.js": () => import("./index.17fa9fb1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/it-CH/index.js": () => import("./index.88f87740.js").then((t) => t.i), "../../../node_modules/date-fns/locale/it/index.js": () => import("./index.ab49c3fc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ja-Hira/index.js": () => import("./index.ce768f9f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ja/index.js": () => import("./index.a54c60cb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ka/index.js": () => import("./index.9cb48c9a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/kk/index.js": () => import("./index.5e216bc1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/km/index.js": () => import("./index.01a4b53a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/kn/index.js": () => import("./index.4abbfa6e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ko/index.js": () => import("./index.99f6053d.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lb/index.js": () => import("./index.716ea6bf.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lt/index.js": () => import("./index.34b9f899.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lv/index.js": () => import("./index.79b10c9a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mk/index.js": () => import("./index.5cc5262d.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mn/index.js": () => import("./index.a6a0aacf.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ms/index.js": () => import("./index.0b2d87fc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mt/index.js": () => import("./index.38684601.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nb/index.js": () => import("./index.76402a99.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nl-BE/index.js": () => import("./index.d1f24df1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nl/index.js": () => import("./index.59b216bf.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nn/index.js": () => import("./index.c1fcb9c8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/oc/index.js": () => import("./index.a8585463.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pl/index.js": () => import("./index.d495d0eb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pt-BR/index.js": () => import("./index.bf041dfa.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pt/index.js": () => import("./index.f1bc2a92.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ro/index.js": () => import("./index.dd92c2bb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ru/index.js": () => import("./index.d10c5477.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sk/index.js": () => import("./index.7ca2ebb2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sl/index.js": () => import("./index.51065c0c.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sq/index.js": () => import("./index.abd1065c.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sr-Latn/index.js": () => import("./index.e1870423.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sr/index.js": () => import("./index.8d85a2c2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sv/index.js": () => import("./index.4fddeac7.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ta/index.js": () => import("./index.c3242456.js").then((t) => t.i), "../../../node_modules/date-fns/locale/te/index.js": () => import("./index.0e3df7da.js").then((t) => t.i), "../../../node_modules/date-fns/locale/th/index.js": () => import("./index.8b7ac4dd.js").then((t) => t.i), "../../../node_modules/date-fns/locale/tr/index.js": () => import("./index.f77c1edc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ug/index.js": () => import("./index.c4e3fbb3.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uk/index.js": () => import("./index.4fe41ffe.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uz-Cyrl/index.js": () => import("./index.9330027f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uz/index.js": () => import("./index.b6508bd0.js").then((t) => t.i), "../../../node_modules/date-fns/locale/vi/index.js": () => import("./index.f2c37d8f.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-CN/index.js": () => import("./index.093afa2a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-HK/index.js": () => import("./index.c356a3d9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-TW/index.js": () => import("./index.cd00072e.js").then((t) => t.i) }), `../../../node_modules/date-fns/locale/${e}/index.js`).then((t) => (t && (Ml[e] = t), null));
16355
+ return Hj(/* @__PURE__ */ Object.assign({ "../../../node_modules/date-fns/locale/af/index.js": () => import("./index.4f7ba8fb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-DZ/index.js": () => import("./index.d4ac91bf.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-EG/index.js": () => import("./index.bd826cbc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-MA/index.js": () => import("./index.9ab80fb4.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-SA/index.js": () => import("./index.18e64992.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-TN/index.js": () => import("./index.588531a8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ar/index.js": () => import("./index.ac46a6ce.js").then((t) => t.i), "../../../node_modules/date-fns/locale/az/index.js": () => import("./index.101527a8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/be-tarask/index.js": () => import("./index.ae7f6cae.js").then((t) => t.i), "../../../node_modules/date-fns/locale/be/index.js": () => import("./index.f7bc98a2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bg/index.js": () => import("./index.c449c086.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bn/index.js": () => import("./index.79c9f4b0.js").then((t) => t.i), "../../../node_modules/date-fns/locale/bs/index.js": () => import("./index.62abdbae.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ca/index.js": () => import("./index.60bfefbd.js").then((t) => t.i), "../../../node_modules/date-fns/locale/cs/index.js": () => import("./index.8e56799d.js").then((t) => t.i), "../../../node_modules/date-fns/locale/cy/index.js": () => import("./index.04356208.js").then((t) => t.i), "../../../node_modules/date-fns/locale/da/index.js": () => import("./index.86efe720.js").then((t) => t.i), "../../../node_modules/date-fns/locale/de-AT/index.js": () => import("./index.a3112c09.js").then((t) => t.i), "../../../node_modules/date-fns/locale/de/index.js": () => import("./index.5afba447.js").then((t) => t.i), "../../../node_modules/date-fns/locale/el/index.js": () => import("./index.e4e62b6e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-AU/index.js": () => import("./index.49a1ba66.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-CA/index.js": () => import("./index.21dcabd5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-GB/index.js": () => import("./index.024714ae.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IE/index.js": () => import("./index.617404ef.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IN/index.js": () => import("./index.d0696cbb.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-NZ/index.js": () => import("./index.a828f4e9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-US/index.js": () => import("./index.bd1c91e9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/en-ZA/index.js": () => import("./index.ca93833e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/eo/index.js": () => import("./index.55682359.js").then((t) => t.i), "../../../node_modules/date-fns/locale/es/index.js": () => import("./index.46a0bba2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/et/index.js": () => import("./index.16ff098b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/eu/index.js": () => import("./index.be840bc9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fa-IR/index.js": () => import("./index.ebf5659e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fi/index.js": () => import("./index.f4d989a9.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CA/index.js": () => import("./index.905aa911.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CH/index.js": () => import("./index.9430891b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fr/index.js": () => import("./index.98f61f05.js").then((t) => t.i), "../../../node_modules/date-fns/locale/fy/index.js": () => import("./index.87e33037.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gd/index.js": () => import("./index.b6aff350.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gl/index.js": () => import("./index.af6e9cb3.js").then((t) => t.i), "../../../node_modules/date-fns/locale/gu/index.js": () => import("./index.7be70403.js").then((t) => t.i), "../../../node_modules/date-fns/locale/he/index.js": () => import("./index.9d0618bd.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hi/index.js": () => import("./index.d2a19ffc.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hr/index.js": () => import("./index.bea5728b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ht/index.js": () => import("./index.bcdaffbd.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hu/index.js": () => import("./index.16c891a2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/hy/index.js": () => import("./index.fd5c9038.js").then((t) => t.i), "../../../node_modules/date-fns/locale/id/index.js": () => import("./index.f8cb8dac.js").then((t) => t.i), "../../../node_modules/date-fns/locale/is/index.js": () => import("./index.8e4cf8fa.js").then((t) => t.i), "../../../node_modules/date-fns/locale/it-CH/index.js": () => import("./index.5ae6b23d.js").then((t) => t.i), "../../../node_modules/date-fns/locale/it/index.js": () => import("./index.236dbf52.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ja-Hira/index.js": () => import("./index.54db78ee.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ja/index.js": () => import("./index.e4a05e6b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ka/index.js": () => import("./index.38545386.js").then((t) => t.i), "../../../node_modules/date-fns/locale/kk/index.js": () => import("./index.57db7bea.js").then((t) => t.i), "../../../node_modules/date-fns/locale/km/index.js": () => import("./index.c67d020d.js").then((t) => t.i), "../../../node_modules/date-fns/locale/kn/index.js": () => import("./index.519c5437.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ko/index.js": () => import("./index.6e56f188.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lb/index.js": () => import("./index.eefd3dfe.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lt/index.js": () => import("./index.85d1ef56.js").then((t) => t.i), "../../../node_modules/date-fns/locale/lv/index.js": () => import("./index.0aa67127.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mk/index.js": () => import("./index.96926c45.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mn/index.js": () => import("./index.431256f2.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ms/index.js": () => import("./index.616ef74b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/mt/index.js": () => import("./index.cec3a46e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nb/index.js": () => import("./index.63c87185.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nl-BE/index.js": () => import("./index.5aeec319.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nl/index.js": () => import("./index.9b99a0b1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/nn/index.js": () => import("./index.3a6a6d8b.js").then((t) => t.i), "../../../node_modules/date-fns/locale/oc/index.js": () => import("./index.101a386a.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pl/index.js": () => import("./index.1796ac5e.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pt-BR/index.js": () => import("./index.0ddef7f7.js").then((t) => t.i), "../../../node_modules/date-fns/locale/pt/index.js": () => import("./index.8eb9d690.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ro/index.js": () => import("./index.3ef0ccad.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ru/index.js": () => import("./index.d0baa8ae.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sk/index.js": () => import("./index.c3c36470.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sl/index.js": () => import("./index.330a88e6.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sq/index.js": () => import("./index.cc9e8411.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sr-Latn/index.js": () => import("./index.f2586a11.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sr/index.js": () => import("./index.b02dcf35.js").then((t) => t.i), "../../../node_modules/date-fns/locale/sv/index.js": () => import("./index.d45365e5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ta/index.js": () => import("./index.fca37fd8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/te/index.js": () => import("./index.16aae745.js").then((t) => t.i), "../../../node_modules/date-fns/locale/th/index.js": () => import("./index.bd412419.js").then((t) => t.i), "../../../node_modules/date-fns/locale/tr/index.js": () => import("./index.d93d33c5.js").then((t) => t.i), "../../../node_modules/date-fns/locale/ug/index.js": () => import("./index.30e480e1.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uk/index.js": () => import("./index.bd479ffd.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uz-Cyrl/index.js": () => import("./index.0bdc6c44.js").then((t) => t.i), "../../../node_modules/date-fns/locale/uz/index.js": () => import("./index.5ea84fa7.js").then((t) => t.i), "../../../node_modules/date-fns/locale/vi/index.js": () => import("./index.634067e8.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-CN/index.js": () => import("./index.3d2aecde.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-HK/index.js": () => import("./index.a7d0e9ff.js").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-TW/index.js": () => import("./index.3fedc6ea.js").then((t) => t.i) }), `../../../node_modules/date-fns/locale/${e}/index.js`).then((t) => (t && (Ml[e] = t), null));
16356
16356
  } catch (t) {
16357
16357
  return t;
16358
16358
  }
@@ -25594,7 +25594,7 @@ const T9 = /* @__PURE__ */ ro(e0.exports), E9 = ee.rollbar.clientToken, k9 = new
25594
25594
  payload: {
25595
25595
  client: {
25596
25596
  javascript: {
25597
- code_version: "0.0.8",
25597
+ code_version: "0.0.9",
25598
25598
  source_map_enabled: !0,
25599
25599
  guess_uncaught_frames: !0
25600
25600
  }
@@ -42597,7 +42597,7 @@ const tie = [
42597
42597
  {
42598
42598
  name: "DocFormSend",
42599
42599
  path: "/send",
42600
- component: () => import("./DocFormSend.a1382bdd.js"),
42600
+ component: () => import("./DocFormSend.af229ffe.js"),
42601
42601
  props: !0,
42602
42602
  meta: {
42603
42603
  mode: "drawer"
@@ -0,0 +1,4 @@
1
+ import { G as f } from "./main.3d787203.js";
2
+ export {
3
+ f as default
4
+ };
@@ -345,7 +345,7 @@ In order to facilitate your application for deduction, {{company.name}} needs yo
345
345
  `+o+O.join(`,
346
346
  `+o)+`
347
347
  `+P+"}":"{"+O.join(",")+"}",o=P,x}}("",{"":M})}),typeof a.parse!="function"&&(a.parse=(p={"\\":"\\",'"':'"',"/":"/",t:" ",n:`
348
- `,r:"\r",f:"\f",b:"\b"},h={go:function(){l="ok"},firstokey:function(){m=c,l="colon"},okey:function(){m=c,l="colon"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},v={go:function(){l="ok"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},g={"{":{go:function(){d.push({state:"ok"}),f={},l="firstokey"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f={},l="firstokey"},firstavalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"},avalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"}},"}":{firstokey:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},ocomma:function(){var M=d.pop();f[m]=c,c=f,f=M.container,m=M.key,l=M.state}},"[":{go:function(){d.push({state:"ok"}),f=[],l="firstavalue"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f=[],l="firstavalue"},firstavalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"},avalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"}},"]":{firstavalue:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},acomma:function(){var M=d.pop();f.push(c),c=f,f=M.container,m=M.key,l=M.state}},":":{colon:function(){if(Object.hasOwnProperty.call(f,m))throw new SyntaxError("Duplicate key '"+m+'"');l="ovalue"}},",":{ocomma:function(){f[m]=c,l="okey"},acomma:function(){f.push(c),l="avalue"}},true:{go:function(){c=!0,l="ok"},ovalue:function(){c=!0,l="ocomma"},firstavalue:function(){c=!0,l="acomma"},avalue:function(){c=!0,l="acomma"}},false:{go:function(){c=!1,l="ok"},ovalue:function(){c=!1,l="ocomma"},firstavalue:function(){c=!1,l="acomma"},avalue:function(){c=!1,l="acomma"}},null:{go:function(){c=null,l="ok"},ovalue:function(){c=null,l="ocomma"},firstavalue:function(){c=null,l="acomma"},avalue:function(){c=null,l="acomma"}}},function(M,C){var F,T,N=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;l="go",d=[];try{for(;F=N.exec(M);)F[1]?g[F[1]][l]():F[2]?(c=+F[2],v[l]()):(T=F[3],c=T.replace(/\\(?:u(.{4})|([^u]))/g,function(W,$,E){return $?String.fromCharCode(parseInt($,16)):p[E]}),h[l]()),M=M.slice(F[0].length)}catch(W){l=W}if(l!=="ok"||/[^\u0020\t\n\r]/.test(M))throw l instanceof SyntaxError?l:new SyntaxError("JSON");return typeof C=="function"?function W($,E){var L,x,S=$[E];if(S&&typeof S=="object")for(L in c)Object.prototype.hasOwnProperty.call(S,L)&&((x=W(S,L))!==void 0?S[L]=x:delete S[L]);return C.call($,E,S)}({"":c},""):c}))}},function(r,n,a){function o(i,s,u){if(s.hasOwnProperty&&s.hasOwnProperty("addEventListener")){for(var l=s.addEventListener;l._rollbarOldAdd&&l.belongsToShim;)l=l._rollbarOldAdd;var d=function(c,p,h){l.call(this,c,i.wrap(p),h)};d._rollbarOldAdd=l,d.belongsToShim=u,s.addEventListener=d;for(var f=s.removeEventListener;f._rollbarOldRemove&&f.belongsToShim;)f=f._rollbarOldRemove;var m=function(c,p,h){f.call(this,c,p&&p._rollbar_wrapped||p,h)};m._rollbarOldRemove=f,m.belongsToShim=u,s.removeEventListener=m}}r.exports=function(i,s,u){if(i){var l,d,f="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(l=0;l<f.length;++l)i[d=f[l]]&&i[d].prototype&&o(s,i[d].prototype,u)}}},function(r,n,a){var o=a(0),i=a(5);function s(h,v){return[h,o.stringify(h,v)]}function u(h,v){var g=h.length;return g>2*v?h.slice(0,v).concat(h.slice(g-v)):h}function l(h,v,g){g=g===void 0?30:g;var _,y=h.data.body;if(y.trace_chain)for(var b=y.trace_chain,k=0;k<b.length;k++)_=u(_=b[k].frames,g),b[k].frames=_;else y.trace&&(_=u(_=y.trace.frames,g),y.trace.frames=_);return[h,o.stringify(h,v)]}function d(h,v){return v&&v.length>h?v.slice(0,h-3).concat("..."):v}function f(h,v,g){return[v=i(v,function _(y,b,k){switch(o.typeName(b)){case"string":return d(h,b);case"object":case"array":return i(b,_,k);default:return b}}),o.stringify(v,g)]}function m(h){return h.exception&&(delete h.exception.description,h.exception.message=d(255,h.exception.message)),h.frames=u(h.frames,1),h}function c(h,v){var g=h.data.body;if(g.trace_chain)for(var _=g.trace_chain,y=0;y<_.length;y++)_[y]=m(_[y]);else g.trace&&(g.trace=m(g.trace));return[h,o.stringify(h,v)]}function p(h,v){return o.maxByteSize(h)>v}r.exports={truncate:function(h,v,g){g=g===void 0?524288:g;for(var _,y,b,k=[s,l,f.bind(null,1024),f.bind(null,512),f.bind(null,256),c];_=k.shift();)if(h=(y=_(h,v))[0],(b=y[1]).error||!p(b.value,g))return b;return b},raw:s,truncateFrames:l,truncateStrings:f,maybeTruncateValue:d}}])})})(fV);const Wwe=ae(fV.exports),Fwe=Me.rollbar.clientToken,jwe=new Wwe({accessToken:Fwe,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Me.rollbar.environment||Me.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.0.8",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let r=0;r<e.frames.length;r++){const{filename:n}=e.frames[r];n&&(e.frames[r].filename=e.frames[r].filename.replace(Me.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:js,LOAD_USER_POSITION:Vwe,LOAD_USER:Vs,LOGIN_USER:sm,LOGIN_AUTH_TOKEN:mV,AUTH_3RD_PARTY_USER:pV,SWITCH_CONNECTED_USER:hV,LOGOUT_USER:um,REGISTER_USER:vV,RESET_USER_PASSWORD:gV}=Vl,{DO_LOAD_CURRENT_COMPANY:zwe,DO_LOAD_ALL_SETTINGS:Uwe,DO_NORMALIZE_COMPANY_USERS:Hwe,LOAD_UNREAD_NOTIFICATIONS:qwe}=Oe,{SET_USER_LOCATION:Bwe,SET_USER:Kt}=It,yV=t=>be.te(`errors:${t}`)&&be.t(`errors:${t}`),Ywe={async[Vs]({commit:t,getters:e,dispatch:r}){var n,a,o;try{if(!Ze.getItem("token")){Ze.removeItem("tokenExpire"),Ze.removeItem("refreshToken"),t(Kt,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:i},{data:s=[]}]=await Promise.all([cr.get("/companyUser/self"),r3.getConnectedUsers()]),{id:u,CompanyId:l,crispUserHash:d,language:f,locale:m}=i;f&&be.i18next.changeLanguage(f),m&&be.l10n.changeLocale(m),await this.dispatch(Hwe,{companyUsers:[{...i,connectedUsers:s}]}),t(Kt,{userId:u,companyId:l,crispUserHash:d}),await this.dispatch(zwe),await this.dispatch(Uwe),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(qwe,{throttleTime:5});const{user:c,company:p,isQualified:h}=e;if(c){let v="";(c.firstname||c.lastname)&&(v=c.fullName),jwe.configure({payload:{person:{id:c.id,username:v||null,email:c.email||null}}}),(n=this.$supportChat)==null||n.syncData(),(a=this.$trackevent)==null||a.call(this,"loadUser",{companyUserId:c.id}),(o=this.$segment)==null||o.identifyCompanyUser()}}catch(i){this.handleError(i,{action:Vs,actionPayload:null}),r(um)}},async[sm]({commit:t,dispatch:e},{email:r,password:n,doRedirect:a=!0,doLoadUser:o=!0,superUserId:i=null,responseType:s=null,code:u=null}){try{t(Kt,{isLoggingIn:!0}),e(js,{view:"login",settings:{error:null}});let l;if(i?({data:l}=await cr.post("/auth/employee",{email:r,password:n,CompanyUserId:i}),Ze.setItem("isClingEmployee",!0)):u?({data:l}=await cr.post("/oauth2/token",{code:u,client_id:Me.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...Af(this._vm.$view)}),l={token:l.access_token,tokenExpires:l.expires_in,refreshToken:l.refresh_token}):{data:l}=await cr.post("/auth/companyUser",{email:r,password:n,response_type:s,...Af(this._vm.$view)}),s==="code"&&l.code)return t(Kt,{isLoggingIn:!1}),l;const{token:d,tokenExpires:f,refreshToken:m}=l;if(Ze.setItem("token",d),Ze.setItem("tokenExpires",f),Ze.setItem("refreshToken",m),t(Kt,{isLoggingIn:!1}),o&&await e(Vs),!a)return!0;const{redirect:c}=this.state.route.query||{};return c?(this.$router.push(c),!0):(this.$router.push({name:"account"}),!0)}catch(l){let d=be.t("errors:fallback"),f=!1;if(l&&typeof l.getPayload=="function"){const m=l.getPayload();m&&m.axios&&m.axios.status===401&&(f=!0)}return f&&(d=be.t("actions:loginUser.wrongCredentials")),e(js,{view:"login",settings:{error:d}}),t(Kt,{isLoggingIn:!1}),f||this.handleError(l,{action:sm,actionPayload:null}),!1}},async[mV]({commit:t,dispatch:e},{authToken:r,to:n}){let a={};try{if(!r)throw new Error("Missing param authToken");if(!n)throw new Error("Missing param to");t(Kt,{isLoggingIn:!0}),a=Object.assign({},n.query),delete a.authtoken;const{data:o}=await $me(r,{...Af(this._vm.$view)}),{token:i,tokenExpires:s,refreshToken:u}=o;Ze.setItem("token",i),Ze.setItem("tokenExpires",s),Ze.setItem("refreshToken",u),await e(Vs),this.$router.push({path:n.path,query:a})}catch(o){const i=n.path;await e(um,{next:{name:"Login",query:{redirect:i}}}),this.handleError(o,{action:mV,actionPayload:null})}finally{t(Kt,{isLoggingIn:!1})}},async[pV]({commit:t,dispatch:e},{service:r,code:n}){t(Kt,{isLoggingIn:!0});const a={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:o}=await t1.signupWithCrm(r,{code:n,doLogin:!0,...Af(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:i,authenticate:s}=o,{token:u,tokenExpires:l,refreshToken:d,company:f,companyUser:m}=s;return Ze.setItem("token",u),Ze.setItem("tokenExpires",l),Ze.setItem("refreshToken",d),m&&m.isSlave&&!m.verifiedEmailAt?(a.companyUser=m,a.isVerify=!0,a):(await e(Vs),i&&(a.addedToExistingCompanyId=i),a.company=f,a.isAuth=!0,a)}catch(o){return this.handleError(o,{action:pV,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:o.message}}finally{t(Kt,{isLoggingIn:!1})}},async[hV]({commit:t,dispatch:e},{companyUserId:r,doRedirect:n=!0}){try{if(typeof r>"u")throw new Error("Missing param companyUserId");t(Kt,{isLoggingIn:!0});const{data:a}=await r3.getConnectedUserAuth(r),{token:o,tokenExpires:i,refreshToken:s}=a;Ze.setItem("token",o),Ze.setItem("tokenExpires",i),Ze.setItem("refreshToken",s),this.commit("reset"),await e(Vs),n?this.$router.push({name:"account"}):window.reloadApp(!0)}catch(a){this.handleError(a,{action:hV,actionPayload:null})}finally{t(Kt,{isLoggingIn:!1})}},async[vV]({commit:t,dispatch:e},{company:r,companyUser:n,termsVersion:a,voucherCode:o=null,source:i=null,region:s,language:u,currency:l,throwIfSlaveUser:d}){var f,m;try{const c={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(js,{view:"register",settings:{error:null}}),t(Kt,{isRegistering:!0}),!r)throw new Error("Missing param company");if(!n)throw new Error("Missing param companyUser");if(!a)throw new Error("Missing param termsVersion");const{data:p}=await Ame({Company:r,CompanyUser:n,voucherCode:o,source:i,region:s,language:u,currency:l,throwIfSlaveUser:d}),{CompanyUser:h}=p,v={type:"terms",version:a,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await Ime(v),h.isSlave)return c.isVerify=!0,c;const g=await e(sm,{email:n.email,password:n.password,doRedirect:!1});return c.isAuth=g,g&&((f=this.$trackevent)==null||f.call(this,"register")),(m=this.$segment)==null||m.track("Register Documents Viewed",JSON.parse(Ze.getItem("documentsViewed"))||[]),c}catch(c){if(te(c,"payload.code")===4008&&d)throw c;if(c&&c.code){const p=yV(c.code);p&&e(js,{view:"register",settings:{error:p}})}return this.handleError(c,{action:vV,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Kt,{isRegistering:!1})}},async[gV]({commit:t,dispatch:e},{password:r,token:n,doRedirect:a=!0}){try{if(e(js,{view:"register",settings:{error:null}}),t(Kt,{isResettingPassword:!0}),!r)throw new Error("Missing param password");if(!n)throw new Error("Missing param token");const{data:o}=await Rme(r,n),{email:i}=o;return await e(sm,{email:i,password:r,doRedirect:a}),!0}catch(o){if(o&&o.code){const i=yV(o.code);i&&e(js,{view:"register",settings:{error:i}})}return this.handleError(o,{action:gV,actionPayload:null}),!1}finally{t(Kt,{isResettingPassword:!1})}},[um]({commit:t},{next:e}={}){try{Ze.removeItem("token"),Ze.removeItem("tokenExpires"),Ze.removeItem("refreshToken"),this.commit("reset")}finally{t(Kt,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(r){this.handleError(r,{action:um,actionPayload:null})}return this.$router.replace({name:"Login"})},[Vwe]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(Bwe,[e.longitude,e.latitude])})}},X1=new Map,{PUSH_MODAL:Gwe,POP_MODAL:Kwe,SET_CAN_CLOSE_MODAL:Xwe,SHOW_MESSAGE:Jwe,CLEAR_MESSAGE:Qwe,CLEAR_MESSAGE_BY_ID:Zwe,MESSAGE_ACTION:_V,UPDATE_VIEW_SETTINGS:e1e,RESET_VIEW_SETTINGS:t1e,SHOW_ERROR:r1e,RESET_ERROR:n1e}=Vl,a1e={...Ywe,[Gwe]({commit:t,state:e},r){const n={...r,_uniqueId:On.exports()};t(It.SET_MODALS,[...e.modals,n])},[Kwe]({commit:t,state:e}){t(It.SET_MODALS,e.modals.slice(0,-1))},[Xwe]({commit:t},e){t(It.SET_CAN_CLOSE_MODAL,e)},[Jwe]({commit:t,state:e},r){const{type:n,displayType:a="notification",time:o=5e3,title:i,message:s,closeButton:u,omit:l=""}=r,d={},f={};if((p=>{const[h="foo",v="bar"]=p.split(":");return this._vm[h]===v})(l))return;r.actions&&Object.keys(r.actions).forEach(p=>{const h=r.actions[p];if(typeof h=="object"&&!Array.isArray(h)){if(!h.fn&&!h.callback)throw Error(`No callback function provided for action ${p}`);d[p]=h.fn||h.callback,delete h.fn,delete h.callback,f[p]=h}else if(typeof h=="string")d[p]=h,f[p]={};else if(typeof h=="function")d[p]=h,f[p]={};else throw Error(`Action, ${p} , must be one of: object|string|function`)}),t(It.ADD_MESSAGE,{actions:f,title:i,message:s,type:n,displayType:a,time:o,closeButton:u});const c=e.messages.slice(-1)[0];return X1.set(c._uniqueId,d),c._uniqueId},[Qwe]({commit:t,state:e},r){const n=e.messages[r]||{};t(It.REMOVE_MESSAGE,r),X1.delete(n._uniqueId)},[Zwe]({dispatch:t,state:e},r){const n=e.messages.findIndex(a=>a._uniqueId===r);t(Vl.CLEAR_MESSAGE,n)},[_V]({state:t,dispatch:e},{index:r,type:n}){try{const a={cancel:()=>e(Vl.CLEAR_MESSAGE,r)},o=t.messages[r]||{};if(!o||!o._uniqueId)throw Error("message not found, failed to trigger action");const i=X1.get(o._uniqueId);if(!i)throw Error("message has no actions, failed to trigger action");const s=i[n];if(!s)throw Error(`message has no action of type ${n}`);let u=s;if(typeof s=="string"&&(u=a[s],!u))throw Error(`No predefined action of type ${s}`);if(typeof u!="function")throw Error("Unable to extract function from message action");return u(o)}catch(a){return this.handleError(a,{action:_V,actionPayload:arguments[1],retries:0})}},[e1e]({commit:t},{view:e,settings:r}){t(It.SET_VIEW_SETTINGS,{view:e,settings:r})},[t1e]({commit:t}){t(It.RESET_VIEW_SETTINGS)},[r1e]({commit:t},e){t(It.SET_ERROR,e)},[n1e]({commit:t}){t(It.RESET_ERROR)}};function lm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i1e(t,e){return o1e(t)||s1e(t,e)||u1e(t,e)||l1e()}function o1e(t){if(Array.isArray(t))return t}function s1e(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function u1e(t,e){if(!!t){if(typeof t=="string")return bV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bV(t,e)}}function bV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
348
+ `,r:"\r",f:"\f",b:"\b"},h={go:function(){l="ok"},firstokey:function(){m=c,l="colon"},okey:function(){m=c,l="colon"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},v={go:function(){l="ok"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},g={"{":{go:function(){d.push({state:"ok"}),f={},l="firstokey"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f={},l="firstokey"},firstavalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"},avalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"}},"}":{firstokey:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},ocomma:function(){var M=d.pop();f[m]=c,c=f,f=M.container,m=M.key,l=M.state}},"[":{go:function(){d.push({state:"ok"}),f=[],l="firstavalue"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f=[],l="firstavalue"},firstavalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"},avalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"}},"]":{firstavalue:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},acomma:function(){var M=d.pop();f.push(c),c=f,f=M.container,m=M.key,l=M.state}},":":{colon:function(){if(Object.hasOwnProperty.call(f,m))throw new SyntaxError("Duplicate key '"+m+'"');l="ovalue"}},",":{ocomma:function(){f[m]=c,l="okey"},acomma:function(){f.push(c),l="avalue"}},true:{go:function(){c=!0,l="ok"},ovalue:function(){c=!0,l="ocomma"},firstavalue:function(){c=!0,l="acomma"},avalue:function(){c=!0,l="acomma"}},false:{go:function(){c=!1,l="ok"},ovalue:function(){c=!1,l="ocomma"},firstavalue:function(){c=!1,l="acomma"},avalue:function(){c=!1,l="acomma"}},null:{go:function(){c=null,l="ok"},ovalue:function(){c=null,l="ocomma"},firstavalue:function(){c=null,l="acomma"},avalue:function(){c=null,l="acomma"}}},function(M,C){var F,T,N=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;l="go",d=[];try{for(;F=N.exec(M);)F[1]?g[F[1]][l]():F[2]?(c=+F[2],v[l]()):(T=F[3],c=T.replace(/\\(?:u(.{4})|([^u]))/g,function(W,$,E){return $?String.fromCharCode(parseInt($,16)):p[E]}),h[l]()),M=M.slice(F[0].length)}catch(W){l=W}if(l!=="ok"||/[^\u0020\t\n\r]/.test(M))throw l instanceof SyntaxError?l:new SyntaxError("JSON");return typeof C=="function"?function W($,E){var L,x,S=$[E];if(S&&typeof S=="object")for(L in c)Object.prototype.hasOwnProperty.call(S,L)&&((x=W(S,L))!==void 0?S[L]=x:delete S[L]);return C.call($,E,S)}({"":c},""):c}))}},function(r,n,a){function o(i,s,u){if(s.hasOwnProperty&&s.hasOwnProperty("addEventListener")){for(var l=s.addEventListener;l._rollbarOldAdd&&l.belongsToShim;)l=l._rollbarOldAdd;var d=function(c,p,h){l.call(this,c,i.wrap(p),h)};d._rollbarOldAdd=l,d.belongsToShim=u,s.addEventListener=d;for(var f=s.removeEventListener;f._rollbarOldRemove&&f.belongsToShim;)f=f._rollbarOldRemove;var m=function(c,p,h){f.call(this,c,p&&p._rollbar_wrapped||p,h)};m._rollbarOldRemove=f,m.belongsToShim=u,s.removeEventListener=m}}r.exports=function(i,s,u){if(i){var l,d,f="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(l=0;l<f.length;++l)i[d=f[l]]&&i[d].prototype&&o(s,i[d].prototype,u)}}},function(r,n,a){var o=a(0),i=a(5);function s(h,v){return[h,o.stringify(h,v)]}function u(h,v){var g=h.length;return g>2*v?h.slice(0,v).concat(h.slice(g-v)):h}function l(h,v,g){g=g===void 0?30:g;var _,y=h.data.body;if(y.trace_chain)for(var b=y.trace_chain,k=0;k<b.length;k++)_=u(_=b[k].frames,g),b[k].frames=_;else y.trace&&(_=u(_=y.trace.frames,g),y.trace.frames=_);return[h,o.stringify(h,v)]}function d(h,v){return v&&v.length>h?v.slice(0,h-3).concat("..."):v}function f(h,v,g){return[v=i(v,function _(y,b,k){switch(o.typeName(b)){case"string":return d(h,b);case"object":case"array":return i(b,_,k);default:return b}}),o.stringify(v,g)]}function m(h){return h.exception&&(delete h.exception.description,h.exception.message=d(255,h.exception.message)),h.frames=u(h.frames,1),h}function c(h,v){var g=h.data.body;if(g.trace_chain)for(var _=g.trace_chain,y=0;y<_.length;y++)_[y]=m(_[y]);else g.trace&&(g.trace=m(g.trace));return[h,o.stringify(h,v)]}function p(h,v){return o.maxByteSize(h)>v}r.exports={truncate:function(h,v,g){g=g===void 0?524288:g;for(var _,y,b,k=[s,l,f.bind(null,1024),f.bind(null,512),f.bind(null,256),c];_=k.shift();)if(h=(y=_(h,v))[0],(b=y[1]).error||!p(b.value,g))return b;return b},raw:s,truncateFrames:l,truncateStrings:f,maybeTruncateValue:d}}])})})(fV);const Wwe=ae(fV.exports),Fwe=Me.rollbar.clientToken,jwe=new Wwe({accessToken:Fwe,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Me.rollbar.environment||Me.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.0.9",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let r=0;r<e.frames.length;r++){const{filename:n}=e.frames[r];n&&(e.frames[r].filename=e.frames[r].filename.replace(Me.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:js,LOAD_USER_POSITION:Vwe,LOAD_USER:Vs,LOGIN_USER:sm,LOGIN_AUTH_TOKEN:mV,AUTH_3RD_PARTY_USER:pV,SWITCH_CONNECTED_USER:hV,LOGOUT_USER:um,REGISTER_USER:vV,RESET_USER_PASSWORD:gV}=Vl,{DO_LOAD_CURRENT_COMPANY:zwe,DO_LOAD_ALL_SETTINGS:Uwe,DO_NORMALIZE_COMPANY_USERS:Hwe,LOAD_UNREAD_NOTIFICATIONS:qwe}=Oe,{SET_USER_LOCATION:Bwe,SET_USER:Kt}=It,yV=t=>be.te(`errors:${t}`)&&be.t(`errors:${t}`),Ywe={async[Vs]({commit:t,getters:e,dispatch:r}){var n,a,o;try{if(!Ze.getItem("token")){Ze.removeItem("tokenExpire"),Ze.removeItem("refreshToken"),t(Kt,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:i},{data:s=[]}]=await Promise.all([cr.get("/companyUser/self"),r3.getConnectedUsers()]),{id:u,CompanyId:l,crispUserHash:d,language:f,locale:m}=i;f&&be.i18next.changeLanguage(f),m&&be.l10n.changeLocale(m),await this.dispatch(Hwe,{companyUsers:[{...i,connectedUsers:s}]}),t(Kt,{userId:u,companyId:l,crispUserHash:d}),await this.dispatch(zwe),await this.dispatch(Uwe),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(qwe,{throttleTime:5});const{user:c,company:p,isQualified:h}=e;if(c){let v="";(c.firstname||c.lastname)&&(v=c.fullName),jwe.configure({payload:{person:{id:c.id,username:v||null,email:c.email||null}}}),(n=this.$supportChat)==null||n.syncData(),(a=this.$trackevent)==null||a.call(this,"loadUser",{companyUserId:c.id}),(o=this.$segment)==null||o.identifyCompanyUser()}}catch(i){this.handleError(i,{action:Vs,actionPayload:null}),r(um)}},async[sm]({commit:t,dispatch:e},{email:r,password:n,doRedirect:a=!0,doLoadUser:o=!0,superUserId:i=null,responseType:s=null,code:u=null}){try{t(Kt,{isLoggingIn:!0}),e(js,{view:"login",settings:{error:null}});let l;if(i?({data:l}=await cr.post("/auth/employee",{email:r,password:n,CompanyUserId:i}),Ze.setItem("isClingEmployee",!0)):u?({data:l}=await cr.post("/oauth2/token",{code:u,client_id:Me.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...Af(this._vm.$view)}),l={token:l.access_token,tokenExpires:l.expires_in,refreshToken:l.refresh_token}):{data:l}=await cr.post("/auth/companyUser",{email:r,password:n,response_type:s,...Af(this._vm.$view)}),s==="code"&&l.code)return t(Kt,{isLoggingIn:!1}),l;const{token:d,tokenExpires:f,refreshToken:m}=l;if(Ze.setItem("token",d),Ze.setItem("tokenExpires",f),Ze.setItem("refreshToken",m),t(Kt,{isLoggingIn:!1}),o&&await e(Vs),!a)return!0;const{redirect:c}=this.state.route.query||{};return c?(this.$router.push(c),!0):(this.$router.push({name:"account"}),!0)}catch(l){let d=be.t("errors:fallback"),f=!1;if(l&&typeof l.getPayload=="function"){const m=l.getPayload();m&&m.axios&&m.axios.status===401&&(f=!0)}return f&&(d=be.t("actions:loginUser.wrongCredentials")),e(js,{view:"login",settings:{error:d}}),t(Kt,{isLoggingIn:!1}),f||this.handleError(l,{action:sm,actionPayload:null}),!1}},async[mV]({commit:t,dispatch:e},{authToken:r,to:n}){let a={};try{if(!r)throw new Error("Missing param authToken");if(!n)throw new Error("Missing param to");t(Kt,{isLoggingIn:!0}),a=Object.assign({},n.query),delete a.authtoken;const{data:o}=await $me(r,{...Af(this._vm.$view)}),{token:i,tokenExpires:s,refreshToken:u}=o;Ze.setItem("token",i),Ze.setItem("tokenExpires",s),Ze.setItem("refreshToken",u),await e(Vs),this.$router.push({path:n.path,query:a})}catch(o){const i=n.path;await e(um,{next:{name:"Login",query:{redirect:i}}}),this.handleError(o,{action:mV,actionPayload:null})}finally{t(Kt,{isLoggingIn:!1})}},async[pV]({commit:t,dispatch:e},{service:r,code:n}){t(Kt,{isLoggingIn:!0});const a={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:o}=await t1.signupWithCrm(r,{code:n,doLogin:!0,...Af(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:i,authenticate:s}=o,{token:u,tokenExpires:l,refreshToken:d,company:f,companyUser:m}=s;return Ze.setItem("token",u),Ze.setItem("tokenExpires",l),Ze.setItem("refreshToken",d),m&&m.isSlave&&!m.verifiedEmailAt?(a.companyUser=m,a.isVerify=!0,a):(await e(Vs),i&&(a.addedToExistingCompanyId=i),a.company=f,a.isAuth=!0,a)}catch(o){return this.handleError(o,{action:pV,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:o.message}}finally{t(Kt,{isLoggingIn:!1})}},async[hV]({commit:t,dispatch:e},{companyUserId:r,doRedirect:n=!0}){try{if(typeof r>"u")throw new Error("Missing param companyUserId");t(Kt,{isLoggingIn:!0});const{data:a}=await r3.getConnectedUserAuth(r),{token:o,tokenExpires:i,refreshToken:s}=a;Ze.setItem("token",o),Ze.setItem("tokenExpires",i),Ze.setItem("refreshToken",s),this.commit("reset"),await e(Vs),n?this.$router.push({name:"account"}):window.reloadApp(!0)}catch(a){this.handleError(a,{action:hV,actionPayload:null})}finally{t(Kt,{isLoggingIn:!1})}},async[vV]({commit:t,dispatch:e},{company:r,companyUser:n,termsVersion:a,voucherCode:o=null,source:i=null,region:s,language:u,currency:l,throwIfSlaveUser:d}){var f,m;try{const c={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(js,{view:"register",settings:{error:null}}),t(Kt,{isRegistering:!0}),!r)throw new Error("Missing param company");if(!n)throw new Error("Missing param companyUser");if(!a)throw new Error("Missing param termsVersion");const{data:p}=await Ame({Company:r,CompanyUser:n,voucherCode:o,source:i,region:s,language:u,currency:l,throwIfSlaveUser:d}),{CompanyUser:h}=p,v={type:"terms",version:a,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await Ime(v),h.isSlave)return c.isVerify=!0,c;const g=await e(sm,{email:n.email,password:n.password,doRedirect:!1});return c.isAuth=g,g&&((f=this.$trackevent)==null||f.call(this,"register")),(m=this.$segment)==null||m.track("Register Documents Viewed",JSON.parse(Ze.getItem("documentsViewed"))||[]),c}catch(c){if(te(c,"payload.code")===4008&&d)throw c;if(c&&c.code){const p=yV(c.code);p&&e(js,{view:"register",settings:{error:p}})}return this.handleError(c,{action:vV,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Kt,{isRegistering:!1})}},async[gV]({commit:t,dispatch:e},{password:r,token:n,doRedirect:a=!0}){try{if(e(js,{view:"register",settings:{error:null}}),t(Kt,{isResettingPassword:!0}),!r)throw new Error("Missing param password");if(!n)throw new Error("Missing param token");const{data:o}=await Rme(r,n),{email:i}=o;return await e(sm,{email:i,password:r,doRedirect:a}),!0}catch(o){if(o&&o.code){const i=yV(o.code);i&&e(js,{view:"register",settings:{error:i}})}return this.handleError(o,{action:gV,actionPayload:null}),!1}finally{t(Kt,{isResettingPassword:!1})}},[um]({commit:t},{next:e}={}){try{Ze.removeItem("token"),Ze.removeItem("tokenExpires"),Ze.removeItem("refreshToken"),this.commit("reset")}finally{t(Kt,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(r){this.handleError(r,{action:um,actionPayload:null})}return this.$router.replace({name:"Login"})},[Vwe]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(Bwe,[e.longitude,e.latitude])})}},X1=new Map,{PUSH_MODAL:Gwe,POP_MODAL:Kwe,SET_CAN_CLOSE_MODAL:Xwe,SHOW_MESSAGE:Jwe,CLEAR_MESSAGE:Qwe,CLEAR_MESSAGE_BY_ID:Zwe,MESSAGE_ACTION:_V,UPDATE_VIEW_SETTINGS:e1e,RESET_VIEW_SETTINGS:t1e,SHOW_ERROR:r1e,RESET_ERROR:n1e}=Vl,a1e={...Ywe,[Gwe]({commit:t,state:e},r){const n={...r,_uniqueId:On.exports()};t(It.SET_MODALS,[...e.modals,n])},[Kwe]({commit:t,state:e}){t(It.SET_MODALS,e.modals.slice(0,-1))},[Xwe]({commit:t},e){t(It.SET_CAN_CLOSE_MODAL,e)},[Jwe]({commit:t,state:e},r){const{type:n,displayType:a="notification",time:o=5e3,title:i,message:s,closeButton:u,omit:l=""}=r,d={},f={};if((p=>{const[h="foo",v="bar"]=p.split(":");return this._vm[h]===v})(l))return;r.actions&&Object.keys(r.actions).forEach(p=>{const h=r.actions[p];if(typeof h=="object"&&!Array.isArray(h)){if(!h.fn&&!h.callback)throw Error(`No callback function provided for action ${p}`);d[p]=h.fn||h.callback,delete h.fn,delete h.callback,f[p]=h}else if(typeof h=="string")d[p]=h,f[p]={};else if(typeof h=="function")d[p]=h,f[p]={};else throw Error(`Action, ${p} , must be one of: object|string|function`)}),t(It.ADD_MESSAGE,{actions:f,title:i,message:s,type:n,displayType:a,time:o,closeButton:u});const c=e.messages.slice(-1)[0];return X1.set(c._uniqueId,d),c._uniqueId},[Qwe]({commit:t,state:e},r){const n=e.messages[r]||{};t(It.REMOVE_MESSAGE,r),X1.delete(n._uniqueId)},[Zwe]({dispatch:t,state:e},r){const n=e.messages.findIndex(a=>a._uniqueId===r);t(Vl.CLEAR_MESSAGE,n)},[_V]({state:t,dispatch:e},{index:r,type:n}){try{const a={cancel:()=>e(Vl.CLEAR_MESSAGE,r)},o=t.messages[r]||{};if(!o||!o._uniqueId)throw Error("message not found, failed to trigger action");const i=X1.get(o._uniqueId);if(!i)throw Error("message has no actions, failed to trigger action");const s=i[n];if(!s)throw Error(`message has no action of type ${n}`);let u=s;if(typeof s=="string"&&(u=a[s],!u))throw Error(`No predefined action of type ${s}`);if(typeof u!="function")throw Error("Unable to extract function from message action");return u(o)}catch(a){return this.handleError(a,{action:_V,actionPayload:arguments[1],retries:0})}},[e1e]({commit:t},{view:e,settings:r}){t(It.SET_VIEW_SETTINGS,{view:e,settings:r})},[t1e]({commit:t}){t(It.RESET_VIEW_SETTINGS)},[r1e]({commit:t},e){t(It.SET_ERROR,e)},[n1e]({commit:t}){t(It.RESET_ERROR)}};function lm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i1e(t,e){return o1e(t)||s1e(t,e)||u1e(t,e)||l1e()}function o1e(t){if(Array.isArray(t))return t}function s1e(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function u1e(t,e){if(!!t){if(typeof t=="string")return bV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bV(t,e)}}function bV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
349
349
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wV(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.reduce(function(e,r){var n=r.split(".").slice(-1)[0];if(e[n])throw new Error("The key `".concat(n,"` is already in use."));return e[n]=r,e},{})}function d1e(t){return Object.keys(t).map(function(e){return[e,t[e]]})}function dm(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=typeof r[0]=="string"?[].concat(r):[""].concat(r),o=i1e(a,4),i=o[0],s=o[1],u=o[2],l=o[3];return i.length&&i.charAt(i.length-1)!=="/"&&(i+="/"),u="".concat(i).concat(u||"getField"),l="".concat(i).concat(l||"updateField"),t(i,s,u,l)}}function cm(t){return function(e){return e.split(/[.[\]]+/).reduce(function(r,n){return r[n]},t)}}function zl(t,e){var r=e.path,n=e.value;r.split(/[.[\]]+/).reduce(function(a,o,i,s){return s.length===i+1&&(a[o]=n),a[o]},t)}var c1e=dm(function(t,e,r,n){var a=Array.isArray(e)?wV(e):e;return Object.keys(a).reduce(function(o,i){var s=a[i],u={get:function(){return this.$store.getters[r](s)},set:function(d){this.$store.commit(n,{path:s,value:d})}};return o[i]=u,o},{})}),f1e=dm(function(t,e,r,n){var a=Array.isArray(e)?wV(e):e;return Object.keys(a).reduce(function(o,i){var s=a[i];return o[i]={get:function(){var l=this.$store,d=d1e(l.getters[r](s));return d.map(function(f){return Object.keys(f[1]).reduce(function(m,c){var p="".concat(s,"[").concat(f[0],"].").concat(c);return Object.defineProperty(m,c,{get:function(){return l.getters[r](p)},set:function(v){l.commit(n,{path:p,value:v})}})},{})})}},o},{})}),xV=function(e){var r,n=e.getterType,a=e.mutationType;return r={},lm(r,n,cm),lm(r,a,zl),lm(r,"mapFields",dm(function(o,i){return c1e(o,i,n,a)})),lm(r,"mapMultiRowFields",dm(function(o,i){return f1e(o,i,n,a)})),r};const{SET_USER_LOCATION:m1e,SET_USER:p1e}=It,h1e={...{[m1e](t,e){t.user.position=e},[p1e](t,e){Object.keys(e).forEach(r=>{t.user[r]=e[r]})}},updateField:zl,[It.SET_MODALS](t,e){ce.set(t,"modals",e)},[It.SET_CAN_CLOSE_MODAL](t,e){ce.set(t,"canCloseModal",e)},[It.ADD_MESSAGE](t,e){t.messages.push(ws(e))},[It.REMOVE_MESSAGE](t,e){ce.delete(t.messages,e)},[It.SET_VIEW_SETTINGS](t,{view:e,settings:r}){Object.keys(r).forEach(n=>{ce.set(t.viewSettings[e],n,r[n])})},[It.RESET_VIEW_SETTINGS](t,e){ce.set(t.viewSettings,e,JSON.parse(Y4.viewSettings[e]))},[It.SET_ERROR](t,e){t.error=e},[It.RESET_ERROR](t){t.error=null},[It.SET_SOCKET_CONNECTED](t,e){t.isSocketConnected=e}};var J1={exports:{}},v1e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Q1(t){this.message=t}Q1.prototype=new Error,Q1.prototype.name="InvalidCharacterError";function g1e(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new Q1("'atob' failed: The string to be decoded is not correctly encoded.");for(var r=0,n,a,o=0,i="";a=e.charAt(o++);~a&&(n=r%4?n*64+a:a,r++%4)?i+=String.fromCharCode(255&n>>(-2*r&6)):0)a=v1e.indexOf(a);return i}var y1e=typeof window<"u"&&window.atob&&window.atob.bind(window)||g1e,kV=y1e;function _1e(t){return decodeURIComponent(kV(t).replace(/(.)/g,function(e,r){var n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}var b1e=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return _1e(e)}catch{return kV(e)}},w1e=b1e;function Ul(t){this.message=t}Ul.prototype=new Error,Ul.prototype.name="InvalidTokenError",J1.exports=function(t,e){if(typeof t!="string")throw new Ul("Invalid token specified");e=e||{};var r=e.header===!0?0:1;try{return JSON.parse(w1e(t.split(".")[r]))}catch(n){throw new Ul("Invalid token specified: "+n.message)}},J1.exports.InvalidTokenError=Ul;const Fb=class{init({store:e}){this.store=e}getValidFeatures(){return Object.keys(Fb.schema)}_isValidAccountType(e){if(!e||ot(e)!=="array")throw new Error("Invalid param accountTypes");const{accountType:r}=this.store.getters["application/companyAccount"]||{};return e.includes(r)}_isValidFeatureKey(e){if(!e||ot(e)!=="string")throw new Error("Invalid param featureKey");const{CompanyFeatures:r}=this.store.getters["application/company"]||{};return r?r[e]:!1}_isValidCompanySetting(e){if(!e||ot(e)!=="string")throw new Error("Invalid param settingKey");return e.split("||").some(n=>{const a=this.store.getters["settings/getCompanySetting"](n);return typeof a=="boolean"&&a})}_isValidCompanyUserSettingFn({name:e,fn:r}){if(!e||ot(e)!=="string")throw new Error("Invalid param name");if(!r||ot(r)!=="function")throw new Error("Invalid param fn");const n=this.store.getters["settings/getCompanyUserSetting"](e);return!!r(n)}_isValidRegion(e){if(!e||ot(e)!=="string")throw new Error("Invalid param requiredRegion");const{region:r}=this.store.getters["application/company"]||{};return r?e===r:!1}_isValidBrand(e){if(!e||ot(e)!=="string")throw new Error("Invalid param requiredBrand");const r=this.store.$brand;return r?e===r:!1}_isCreatedBefore(e){if(!e||ot(e)!=="string")throw new Error("Invalid param feature dateString");const{createdAt:r}=this.store.getters["application/company"]||{};return r?Fse(r,e):!1}_evaluateFeature(e,{returnType:r="boolean"}={}){const n=Fb.schema[e];if(!n||ot(n)!=="object")throw Error(`No rules for feature '${e}' has been defined!`);if(!["boolean","array"].includes(r))throw Error("Invalid param returnType");const a=[];return n.accountTypes&&!this._isValidAccountType(n.accountTypes)&&(a.push("accountTypes"),r==="boolean")||n.featureKey&&!this._isValidFeatureKey(n.featureKey)&&(a.push("featureKey"),r==="boolean")||n.companySetting&&!this._isValidCompanySetting(n.companySetting)&&(a.push("companySetting"),r==="boolean")||n.companyUserSettingFn&&!this._isValidCompanyUserSettingFn(n.companyUserSettingFn)&&(a.push("companyUserSettingFn"),r==="boolean")||n.region&&!this._isValidRegion(n.region)&&(a.push("region"),r==="boolean")||n.brand&&!this._isValidBrand(n.brand)&&(a.push("brand"),r==="boolean")||n.createdBefore&&!this._isCreatedBefore(n.createdBefore)&&(a.push("preDynDoc2"),r==="boolean")?!1:r==="array"?a:!0}checkFeature(e){return this._evaluateFeature(e)}checkFeatureUpgrade(e){const r=this._evaluateFeature(e,{returnType:"array"});return r.length===1&&r.includes("accountTypes")}};let fm=Fb;Ut(fm,"schema",{personalMessage:{},unlimitedCertificates:{},companyAboutUs:{},winProfile:{},templates:{},invoice:{featureKey:"invoice"},sellInvoice:{featureKey:"sellInvoice"},timeTrack:{featureKey:"timeTrack"},task:{featureKey:"task"},reverseVat:{featureKey:"reverseVat"},ataSetting:{featureKey:"ataSetting"},propertyDesignation:{companySetting:"showRot||showGreenRot"},openAccConstruction:{featureKey:"openAccConstruction"},docChapterIsBinding:{companySetting:"showIsBinding"},projectSettingHideAllArticles:{companySetting:"allowHideAllArticles"},docAtaDateDelay:{companySetting:"docAtaShowDateDelay"},docAtaNotIncluded:{companySetting:"docAtaShowNotIncluded"},docAtaPayment:{companySetting:"docAtaShowPayment"},sms:{featureKey:"sms"},smsSenderName:{featureKey:"smsSenderName"},regionSE:{region:"SE"},bankId:{region:"SE",companySetting:"enableBankId"},templateGallery:{companyUserSettingFn:{name:"defaultLanguage",fn:e=>e==="sv"}},clientReview:{brand:"cling"},upgradeSignatureBankId:{companySetting:"upgradeSignatureBankId"},preDynDoc2:{createdBefore:"2020-11-05T00:00:00.000Z"},emailDomain:{featureKey:"emailDomain"},subdomain:{featureKey:"subdomain"},stats:{featureKey:"stats"},api:{featureKey:"api"},fortnox:{featureKey:"fortnox"},inviteCreators:{accountTypes:["base","pro"]}});const jn=new fm,Wa=class{init({store:e}){this.store=e}_getObjectById(e,r){const n=(Wa.schema[r]||{}).$module,{data:a}=this.store.state[n]||{};if(!a)throw Error(`No module for ${r} has been defined!`);return a[e]}_getIdPath(e){return(Wa.schema[e]||{}).$id}_getAllowNullOwner(e){return!!(Wa.schema[e]||{}).$allowNullOwner}_getScopeKey(e){return(Wa.schema[e]||{}).$scopeKey}_getUserId(){const{user:e={}}=this.store.state.application;return e.userId}getValidScopes(){return Object.keys(Wa.schema)}getRequiredCompanyUserPermission(e,r){const n=Wa.schema[e];return!n||!n[r]?[]:Array.isArray(n[r])?n[r]:[n[r]]}hasFeature(e){const r=Wa.featureSchema[e];return r?jn.checkFeature(r):!0}checkPermission(e,r,n=void 0){const{getters:a}=this.store,{CompanyUserPermission:o}=a["application/user"]||{};if(!o||!this.hasFeature(e))return!1;let s=this.getRequiredCompanyUserPermission(e,r);if(!s||s.length===0)return console.warn(`Permission ${r} in scope ${e} has not been implemented`),!1;let u=s.some(d=>o[d]===!0);if(u)return!0;if(!n)return!1;const l=this._getScopeKey(e);if(s=s.map(d=>d.includes("Own")?d:d.replace(`${l[0].toUpperCase()}${l.slice(1)}`,`Own${l[0].toUpperCase()}${l.slice(1)}`)),u=s.some(d=>o[d]===!0),u){const d=this._getObjectById(n,e);if(!d)return!1;if(e==="documents")return this.checkPermission("projects",r,d.projectId);const f=Qfe(d,this._getIdPath(e)),m=this._getAllowNullOwner(e);return f===this._getUserId()||m&&f===null}return!1}getScope(e={}){return this.getValidScopes().find(a=>e[a])}};let Hl=Wa;Ut(Hl,"schema",{projects:{read:"manageProjects",modify:"manageProjects",create:["manageProjects","manageOwnProjects"],delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"projects",$id:"CompanyUserId"},users:{modify:"manageUsers",create:"manageUsers",$scopeKey:"users",$module:"companyUsers",$id:"id"},documents:{create:["manageProjects","manageOwnProjects"],read:"manageProjects",modify:"manageProjects",delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"documents2",$id:"companyUserId"},atas:{create:["manageAtas","manageOwnAtas"],read:"manageAtas",modify:"manageAtas",delete:"manageAtas",readPrice:["manageAtas","showPrices"],$scopeKey:"atas",$module:"documents",$id:"data.CompanyUserId"},company:{create:"manageCompany",read:"manageCompany",modify:"manageCompany",$scopeKey:"company",$module:"companies",$id:"id"},articles:{create:["manageProjects","manageOwnProjects"],modify:["manageProjects","manageOwnProjects"],delete:["manageProjects","manageOwnProjects"],readPrice:["manageOwnAtas","manageAtas","manageProjects","manageOwnProjects","showPrices"],$scopeKey:"projects",$module:"articles",$id:"id"},invoices:{read:["readInvoices","readOwnInvoices"],modify:"modifyInvoices",create:"createInvoices",delete:"deleteInvoices",attest:"attestInvoices",$scopeKey:"invoices",$module:"invoices",$id:"CompanyUserId"},bookkeeping:{modify:"modifyBookkeepingSettings",export:"exportInvoices"},prices:{read:"showPrices"},timeTracks:{read:["readTimeTracks","readOwnTimeTracks"],modify:"modifyTimeTracks",create:"createTimeTracks",delete:["deleteTimeTracks","deleteOwnTimeTracks"],attest:"attestTimeTracks",$scopeKey:"timeTracks",$module:"timeTracks",$id:"CompanyUserId"},templates:{create:"createTemplates",read:"readTemplates",modify:"modifyTemplates",delete:"deleteTemplates"},endCustomers:{read:["readEndCustomers","readOwnEndCustomers"],modify:"modifyEndCustomers",create:"createEndCustomers",delete:"deleteEndCustomers",$scopeKey:"endCustomers",$module:"endCustomers",$id:"CompanyUserId",$allowNullOwner:!0},fortnox:{export:"modifyBookkeepingSettings"}}),Ut(Hl,"featureSchema",{invoices:"invoice",bookkeeping:"invoice",timeTracks:"timeTrack"});const oo=new Hl,x1e={...{userPosition:t=>t.user.position,isLoggingIn:t=>t.user.isLoggingIn,isSuperUser:()=>()=>{const t=Ze.getItem("token");if(!t)return!1;const{employee:e}=J1.exports(t);return!!e},isRegistering:t=>t.user.isRegistering,isResettingPassword:t=>t.user.isResettingPassword,crispUserHash:t=>t.user.crispUserHash,isUserLoaded:({user:t})=>t.userId&&t.companyId&&!0||!1,company:({user:t},e,r,n)=>n["companies/companyById"](t.companyId),companyAccount:({user:t},e,r,n)=>(n["companies/companyById"](t.companyId)||{}).CompanyAccount||null,companyAccountType:(t,e)=>(e.companyAccount||{}).accountType||null,companyRegion:(t,e)=>(e.company||{}).region||(Me.brand==="docspo"?"US":"SE"),subscription:(t,e)=>{const{companyAccount:r={}}=e;if(!r)return{};const{freePremiumDays:n=null,accountType:a=null,maxProjectManagers:o=null,freeDocumentsLeft:i=null,paymentMethod:s,billingCycleInterval:u,billingCycleCount:l,showCalloutConvertStripe:d,hasExceededQuota:f,StripeSubscriptions:m,mrr:c,hasFailedPayments:p,allowFailedPaymentToConvertStripe:h}=r,v=[...new Set([...m.map(b=>b.status)])],g=m.some(b=>(b.stripeItems||[]).some(k=>k.stripePriceStripeId.startsWith("plan_"))),_=W0.includes(a)&&d&&s==="invoice"&&te(r,"documentQuota.newCount")===1e3&&!te(r,"premiumEndAt");return{type:a,trialDaysLeft:n,maxProjectManagers:o,freeDocumentsLeft:i,paymentMethod:s,billingCycleInterval:u,billingCycleCount:l,showCalloutConvertStripe:W0.includes(a)&&d&&s==="invoice",stripeStatuses:v,isPaying:W0.includes(a),hasExceededQuota:f,isStripeLegacy:g,isInvoiceLegacy:_,mrr:c,hasFailedPayments:p,allowFailedPaymentToConvertStripe:h}},user:({user:t},e,r,n)=>n["companyUsers/referenceById"](t.userId),isQualified:(t,{user:e,companyAccount:r})=>!r||!e||typeof e.isQualified!="boolean"?!0:e.isQualified||!["free","trial","premiumTrial"].includes(r.accountType),feature:()=>jn.checkFeature.bind(jn),can:()=>oo.checkPermission.bind(oo)},getField:cm,modals:t=>t.modals,messages:t=>t.messages,isIncVat:t=>t.priceInputVat==="incVat",viewSettings:t=>e=>t.viewSettings[e],showSearch:t=>t.viewSettings.search.show,error:t=>t.error,isSocketConnected:t=>t.isSocketConnected},k1e={namespaced:!0,state:Y4,getters:x1e,actions:a1e,mutations:h1e},P1e={data:{},ids:[],isFetching:!1,isPosting:!1},De={application:It,projects:Wr,forms:Fn,files:Y1,settings:lV,certificates:vwe,companies:H1,companyReferences:ywe,companyReferenceItems:bwe,documents2:B1,invoices:Ewe,timeTracks:Cwe,templates:K1,publicDocuments:Awe,documentTerms:Iwe,notifications:kwe,unitTypes:Lwe,CLEAR_FORM:"CLEAR_FORM",DELETE_ARTICLE:"DELETE_ARTICLE",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",DELETE_CONTRACT:"DELETE_CONTRACT",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",DELETE_PROJECT:"DELETE_PROJECT",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE",DELETE_TEMPLATE_MESSAGE:"DELETE_TEMPLATE_MESSAGE",SET_ARTICLES:"SET_ARTICLES",SET_ATAS:"SET_ATAS",SET_COMPANY_USERS:"SET_COMPANY_USERS",SET_CONTRACTS:"SET_CONTRACTS",SET_ENDCUSTOMERS:"SET_ENDCUSTOMERS",SET_FORM:"SET_FORM",SET_NOTIFICATIONS:"SET_NOTIFICATIONS",SET_OFFERS:"SET_OFFERS",SET_PROJECTS:"SET_PROJECTS",SET_PROJECT_FILES:"SET_PROJECT_FILES",UPDATE_COMPANY:"UPDATE_COMPANY"};function PV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function TV(t,e,r){return e&&PV(t.prototype,e),r&&PV(t,r),t}function Vn(){return Vn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vn.apply(this,arguments)}function Z1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ql(t){return!!(t&&typeof t.hasOwnProperty=="function"&&(t.hasOwnProperty("__ownerID")||t._map&&t._map.hasOwnProperty("__ownerID")))}function MV(t,e,r){return Object.keys(t).reduce(function(n,a){var o=""+a;return n.has(o)?n.set(o,r(n.get(o),t[o])):n},e)}var T1e=function(e){return function(r){return ql(r)?r.get(e):r[e]}},M1e=function(){function t(r,n,a){if(n===void 0&&(n={}),a===void 0&&(a={}),!r||typeof r!="string")throw new Error("Expected a string key for Entity, but found "+r+".");var o=a,i=o.idAttribute,s=i===void 0?"id":i,u=o.mergeStrategy,l=u===void 0?function(p,h){return Vn({},p,h)}:u,d=o.processStrategy,f=d===void 0?function(p){return Vn({},p)}:d,m=o.fallbackStrategy,c=m===void 0?function(p,h){}:m;this._key=r,this._getId=typeof s=="function"?s:T1e(s),this._idAttribute=s,this._mergeStrategy=l,this._processStrategy=f,this._fallbackStrategy=c,this.define(n)}var e=t.prototype;return e.define=function(n){this.schema=Object.keys(n).reduce(function(a,o){var i,s=n[o];return Vn({},a,(i={},i[o]=s,i))},this.schema||{})},e.getId=function(n,a,o){return this._getId(n,a,o)},e.merge=function(n,a){return this._mergeStrategy(n,a)},e.fallback=function(n,a){return this._fallbackStrategy(n,a)},e.normalize=function(n,a,o,i,s,u){var l=this,d=this.getId(n,a,o),f=this.key;if(f in u||(u[f]={}),d in u[f]||(u[f][d]=[]),u[f][d].some(function(c){return c===n}))return d;u[f][d].push(n);var m=this._processStrategy(n,a,o);return Object.keys(this.schema).forEach(function(c){if(m.hasOwnProperty(c)&&typeof m[c]=="object"){var p=l.schema[c],h=typeof p=="function"?p(n):p;m[c]=i(m[c],m,c,h,s,u)}}),s(this,m,n,a,o),d},e.denormalize=function(n,a){var o=this;return ql(n)?MV(this.schema,n,a):(Object.keys(this.schema).forEach(function(i){if(n.hasOwnProperty(i)){var s=o.schema[i];n[i]=a(n[i],s)}}),n)},TV(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),ex=function(){function t(r,n){n&&(this._schemaAttribute=typeof n=="string"?function(a){return a[n]}:n),this.define(r)}var e=t.prototype;return e.define=function(n){this.schema=n},e.getSchemaAttribute=function(n,a,o){return!this.isSingleSchema&&this._schemaAttribute(n,a,o)},e.inferSchema=function(n,a,o){if(this.isSingleSchema)return this.schema;var i=this.getSchemaAttribute(n,a,o);return this.schema[i]},e.normalizeValue=function(n,a,o,i,s,u){var l=this.inferSchema(n,a,o);if(!l)return n;var d=i(n,a,o,l,s,u);return this.isSingleSchema||d===void 0||d===null?d:{id:d,schema:this.getSchemaAttribute(n,a,o)}},e.denormalizeValue=function(n,a){var o=ql(n)?n.get("schema"):n.schema;if(!this.isSingleSchema&&!o)return n;var i=this.isSingleSchema?void 0:ql(n)?n.get("id"):n.id,s=this.isSingleSchema?this.schema:this.schema[o];return a(i||n,s)},TV(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),S1e=function(t){Z1(e,t);function e(n,a){if(!a)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return t.call(this,n,a)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){return this.normalizeValue(a,o,i,s,u,l)},r.denormalize=function(a,o){return this.denormalizeValue(a,o)},e}(ex),O1e=function(t){Z1(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){var d=this;return Object.keys(a).reduce(function(f,m,c){var p,h=a[m];return h!=null?Vn({},f,(p={},p[m]=d.normalizeValue(h,a,m,s,u,l),p)):f},{})},r.denormalize=function(a,o){var i=this;return Object.keys(a).reduce(function(s,u){var l,d=a[u];return Vn({},s,(l={},l[u]=i.denormalizeValue(d,o),l))},{})},e}(ex),E1e=function(e){var r=Array.isArray(e);if(r&&e.length>1)throw new Error("Expected schema definition to be a single schema, but found "+e.length+".");return e[0]},SV=function(e){return Array.isArray(e)?e:Object.keys(e).map(function(r){return e[r]})},D1e=function(e,r,n,a,o,i,s){e=E1e(e);var u=SV(r);return u.map(function(l,d){return o(l,n,a,e,i,s)})},C1e=function(t){Z1(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){var d=this,f=SV(a);return f.map(function(m,c){return d.normalizeValue(m,o,i,s,u,l)}).filter(function(m){return m!=null})},r.denormalize=function(a,o){var i=this;return a&&a.map?a.map(function(s){return i.denormalizeValue(s,o)}):a},e}(ex),OV=function(e,r,n,a,o,i,s){var u=Vn({},r);return Object.keys(e).forEach(function(l){var d=e[l],f=typeof d=="function"?d(r):d,m=o(r[l],r,l,f,i,s);m==null?delete u[l]:u[l]=m}),u},$1e=function(e,r,n){if(ql(r))return MV(e,r,n);var a=Vn({},r);return Object.keys(e).forEach(function(o){a[o]!=null&&(a[o]=n(a[o],e[o]))}),a},A1e=function(){function t(r){this.define(r)}var e=t.prototype;return e.define=function(n){this.schema=Object.keys(n).reduce(function(a,o){var i,s=n[o];return Vn({},a,(i={},i[o]=s,i))},this.schema||{})},e.normalize=function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return OV.apply(void 0,[this.schema].concat(a))},e.denormalize=function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return $1e.apply(void 0,[this.schema].concat(a))},t}(),R1e=function t(e,r,n,a,o,i){if(typeof e!="object"||!e)return e;if(typeof a=="object"&&(!a.normalize||typeof a.normalize!="function")){var s=Array.isArray(a)?D1e:OV;return s(a,e,r,n,t,o,i)}return a.normalize(e,r,n,t,o,i)},I1e=function(e){return function(r,n,a,o,i){var s=r.key,u=r.getId(a,o,i);s in e||(e[s]={});var l=e[s][u];l?e[s][u]=r.merge(l,n):e[s][u]=n}},Se={Array:C1e,Entity:M1e,Object:A1e,Union:S1e,Values:O1e},EV=function(e,r){if(!e||typeof e!="object")throw new Error('Unexpected input given to normalize. Expected type to be "object", found "'+(e===null?"null":typeof e)+'".');var n={},a=I1e(n),o={},i=R1e(e,e,null,r,a,o);return{entities:n,result:i}};const zs=new Se.Entity("files");new Se.Array(zs);const DV=new Se.Entity("projectFiles",{File:zs});new Se.Array(DV);const tx=new Se.Entity("companyUsers");new Se.Array(tx);const rx=new Se.Entity("offers",{Files:[zs]});new Se.Array(rx);const CV=new Se.Entity("atas",{Files:[zs]});new Se.Array(CV);const nx=new Se.Entity("projects",{CompanyUser:tx,ProjectMembers:[tx],ProjectFiles:[DV]});CV.define({Project:nx});const N1e=new Se.Array(nx),L1e=new Se.Entity("articles");new Se.Array(L1e);const $V=new Se.Entity("certificates");new Se.Array($V);const W1e=new Se.Entity("companies",{CompanyCertificates:[$V]}),F1e=new Se.Array(W1e),AV=new Se.Entity("companyReferenceItems",{Image:zs,Thumbnail:zs});new Se.Array(AV);const j1e=new Se.Entity("companyReferences",{CompanyReferenceItems:[AV]});new Se.Array(j1e);const RV=new Se.Entity("contracts",{Offer:rx});new Se.Array(RV),rx.define({Contract:RV}),new Se.Entity("endCustomers");const V1e=new Se.Entity("notifications",{Project:nx});new Se.Array(V1e);const z1e=new Se.Entity("propertyDesignations");new Se.Array(z1e);const U1e=new Se.Entity("templateMessages");new Se.Array(U1e);const Bl="companies",{LOAD_FILE:Oft,FORM_RESET_OLD:IV}=Oe,{SET_FORM:ax}=De.forms,{DO_LOAD_CURRENT_COMPANY:mm,DO_NORMALIZE_COMPANIES:NV,DO_UPDATE_CURRENT_COMPANY:LV,FORM_EDIT_COMPANY:H1e,FORM_SUBMIT_COMPANY:WV,FORM_NEW_COMPANY_BRANDING:FV,FORM_EDIT_COMPANY_BRANDING:ix,FORM_SUBMIT_COMPANY_BRANDING:jV,UPDATE_COMPANY_ACCOUNT_TYPE:VV}=tV,{SET_COMPANIES_FETCHING:ox,SET_COMPANIES_POSTING:ya}=H1,q1e={async[NV](t,{companies:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companies");await this.dispatch(io,{data:e,schema:F1e})},async[mm]({commit:t,dispatch:e}){var r;try{t(ox,!0);const{data:n}=await cr.get("/company");return await e(NV,{companies:[n]}),await((r=this.$supportChat)==null?void 0:r.syncData()),t(ox,!1),n}catch(n){throw t(ox,!1),n}},async[LV]({dispatch:t,commit:e},{body:r}){try{e(ya,!0),await cr.put("/company",r);const n=await t(mm);return e(ya,!1),n}catch(n){throw e(ya,!1),n}},async[VV]({dispatch:t,commit:e},{accountType:r,billingCycleCost:n,billingCycleInterval:a,billingCycleCount:o,premiumSource:i=null,quantity:s}){try{if(e(ya,!0),!r)throw new Error("Missing parameter accountType");if(a&&!o)throw new Error("Param billingCycleCount is required if billingCycleInterval is used");if(!a&&o)throw new Error("Param billingCycleInterval is required if billingCycleCount is used");if((a||o)&&typeof n>"u")throw new Error("Param billingCycleCost is missing");const u={premiumSource:i};return a&&o&&n&&(u.billingCycleInterval=a,u.billingCycleCount=o,u.billingCycleCost=n),typeof s<"u"&&(u.quantity=s),await spe(r,u),await t(mm),e(ya,!1),!0}catch(u){return this.handleError(u,{object:"companyAccount",action:`${Bl}/${VV}`}),!1}finally{e(ya,!1)}},async[H1e]({rootGetters:t},{props:e=[]}={}){try{const r=ha(t["application/company"],e);return this.commit(`forms/${ax}`,{key:"company",formData:r}),!0}catch(r){return this.handleError(r),!1}},async[WV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("company");return await e(LV,{body:r}),await this.dispatch(IV,"company"),!0}catch(r){return this.handleError(r,{object:"companies",fallbackCode:"companies.submit",action:`${Bl}/${WV}`}),!1}},async[FV]({rootGetters:t,dispatch:e}){try{const{CompanyBranding:r}=t["application/company"];if(r&&r.id)return e(ix);const n={about:""};return this.commit(`forms/${ax}`,{key:"companyBranding",formData:n}),!0}catch(r){return this.handleError(r,{object:"companies",action:`${Bl}/${FV}`}),!1}},async[ix]({rootGetters:t}){try{const{CompanyBranding:e}=t["application/company"],r=e;return this.commit(`forms/${ax}`,{key:"companyBranding",formData:r}),!0}catch(e){return this.handleError(e,{object:"companies",action:`${Bl}/${ix}`}),!1}},async[jV]({rootGetters:t,dispatch:e,commit:r}){try{r(ya,!0);const n=t["forms/getFormByKey"]("companyBranding");let{id:a}=n;return a?await cr.put("/companyBranding",n):{id:a}=await cr.post("/companyBranding",n),e(mm),r(ya,!1),await this.dispatch(IV,"companyBranding"),a}catch(n){return r(ya,!1),this.handleError(n,{object:"companies",fallbackCode:"companies.submit",action:`${Bl}/${jV}`}),!1}}},ai=new Se.Entity("files"),B1e=new Se.Array(ai),pm=new Se.Entity("companyUsers"),zV=new Se.Array(pm),UV=new Se.Entity("companies"),Y1e=new Se.Array(UV),so=new Se.Entity("invoices");so.define({InvoiceFiles:[{File:ai,Thumbnail:ai}],creditInvoices:[so],creditsInvoice:so,interestInvoices:[so],interestForInvoice:so});const sx=new Se.Array(so),G1e=new Se.Entity("documents",{data:{Files:B1e,Invoices:sx}}),K1e=new Se.Array(G1e),HV=new Se.Entity("projectFiles",{File:ai}),X1e=new Se.Array(HV),ux=new Se.Entity("projects",{ProjectMembers:zV,ProjectFiles:[{File:ai}],Invoices:sx,CompanyUser:pm}),J1e=new Se.Array(ux),Q1e=new Se.Entity("timeTracks",{CompanyUser:pm,Project:ux}),Z1e=new Se.Array(Q1e),qV=new Se.Entity("companyReference",{CompanyReferenceItem:{Image:ai,Thumbnail:ai}}),exe=new Se.Array(qV),BV=new Se.Entity("documentTerms",{File:ai}),txe=new Se.Array(BV),rxe={project:ux,projects:J1e,invoice:so,invoices:sx,companyReference:qV,companyReferences:exe,projectFile:HV,projectFiles:X1e,documents:K1e,companyUser:pm,companyUsers:zV,company:UV,companies:Y1e,timeTracks:Z1e,documentTerm:BV,documentTerms:txe},nxe=(t,e)=>{const r=rxe[e];return r||console.warn(`No schema found for type: '${e}'`),EV(t,r)};function uo(t,e,r=!1){let n=e.replace(/\[(\d*)\]/ig,(i,s)=>`.${s}`);n=n.split(".");let a=t;const o=n.pop();return n.length>0&&(a=n.reduce((i,s)=>{let u=i[s];return r&&(ot(u)==="undefined"||ot(u)==="null")&&(ce.set(i,s,{}),u=i[s]),u},t)),{root:a,prop:o}}function Us(t,e){function r(n,a){Object.keys(a).forEach(o=>{const i=n[o]instanceof Object&&!Array.isArray(n[o]),s=a[o]instanceof Object&&!Array.isArray(a[o]);if(i&&s){Us(n[o],a[o]);return}ce.set(n,o,a[o])})}r(t,e)}function Yl(t,{keyId:e="id"}={}){const r=[],n={};return t.forEach(a=>{n[a[e]]=a,r.push(a[e])}),{ids:r,values:n}}function YV({schema:t,getters:e,data:r,scope:n=null,instance:a=null}){let o=n;typeof o=="string"&&(o=[o]);const i={};return t&&Object.keys(t).map(s=>(t[s].$virtual&&t[s].$virtual.map(u=>{const{name:l,set:d}=u;let f={};if(r&&typeof r[s]<"u"?f=r[s]:typeof t[s].$default<"u"&&(f=t[s].$default),typeof f>"u")return!1;const m=a||this;return i[l]=d.call(m,f,{getters:e}),!0}),!0)),t&&o&&Array.isArray(o)&&Object.keys(t).map(s=>t[s].$scope?(o.some(l=>t[s].$scope.indexOf(l)>=0)||delete i[s],!0):(delete i[s],!0)),JSON.parse(JSON.stringify(i))}function axe({schema:t,data:e,getters:r,scope:n=null,includeVirtual:a=!1,instance:o=null}){let i=n;if(typeof i=="string"&&(i=[i]),!t)throw new Error("Missing parameter schema");const s={};Object.keys(t).map(l=>(t[l].$default!=="undefined"&&(s[l]=t[l].$default),!0));let u=Object.assign({},s,e);return a&&(u={...u,...YV({schema:t,getters:r,data:e,scope:n,instance:o})}),t&&i&&Array.isArray(i)&&Object.keys(t).map(l=>t[l].$scope?(i.some(f=>t[l].$scope.indexOf(f)>=0)||delete u[l],!0):(delete u[l],!0)),JSON.parse(JSON.stringify(u))}function GV({next:t=null,projectId:e,docType:r,docId:n,invoiceId:a}={},o,i=void 0){if(!t||!o)return!1;switch(t){case"project":{if(!e)throw new Li(`Cannot redirect user on next: '${t}' as no projectId is defined`);o.push({name:"project",params:{id:e,modal:!1}},i);break}case"invoice":{if(!a)throw new Li(`Cannot redirect user on next: '${t}' as no invoiceId is defined`);o.push({name:"invoice",params:{id:a,modal:!1}},i);break}case"preview":{if(a){o.push({name:"previewInvoice",params:{id:a}},i);break}if(!e)throw new Li(`Cannot redirect user on next: '${t}' as no projectId is defined`);if(!r)throw new Li(`Cannot redirect user on next: '${t}' as no docType is defined`);if(!n)throw new Li(`Cannot redirect user on next: '${t}' as no docId is defined`);o.push({name:"Preview",params:{projectId:e,docType:r,docId:n}},i);break}default:throw new Li(`Cannot redirect user on next: '${t}' as it is not implemented`)}return!0}const{SET_COMPANIES:ixe,CLEAR_COMPANIES:oxe,SET_COMPANIES_FETCHING:sxe,SET_COMPANIES_POSTING:uxe}=H1,lxe={[ixe](t,{data:e}){if(typeof e!="object")throw Error("Data must be a company or an array of companies!");const r=Array.isArray(e)?e:[e],{ids:n,values:a}=Yl(r);Us(t.data,a),t.ids=Ji([...n,...t.ids])},[oxe](t){ce.set(t,"data",{}),ce.set(t,"ids",[])},[sxe](t,e){t.isFetching=e},[uxe](t,e){t.isPosting=e}},dxe={namespaced:!0,state:P1e,getters:{companyById:t=>e=>t.data[e],certificateIdListForCurrentCompany:(t,e,r)=>()=>e.certificateIdListForCompany(r.application.user.companyId),certificateIdListForCompany:t=>e=>{const r=t.data[e].CompanyCertificates;return r||[]},isFetching:t=>t.isFetching,isPosting:t=>t.isPosting},actions:q1e,mutations:lxe},cxe={data:{},ids:[],isFetching:!1,isPosting:!1},ii="companyUsers",{LOAD_COMPANY_USERS:KV,LOAD_COMPANY_USER:hm,DO_NORMALIZE_COMPANY_USERS:vm,UPDATE_COMPANY_USER:lx,CREATE_COMPANY_USER:dx,DELETE_COMPANY_USER:XV,PATCH_COMPANY_USER:cx,FORM_NEW_COMPANY_USER:fxe,FORM_EDIT_COMPANY_USER:mxe,FORM_SUBMIT_COMPANY_USER:JV}=rV,{SET_AS_NORMALIZED_DATA:pxe,FORM_RESET_OLD:hxe,DELETE_FILE:vxe}=Oe,{SET_COMPANY_USERS_FETCHING:gm,SET_COMPANY_USERS_POSTING:oi}=q1,gxe={async[vm](t,{companyUsers:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companyUsers");await this.dispatch(pxe,{data:e,schema:"companyUsers"})},async[KV]({dispatch:t,commit:e}){try{e(gm,!0);const{data:r}=await tpe();await t(vm,{companyUsers:r})}catch(r){this.handleError(r,{object:"companyUser",fallbackCode:"companyUser.getAll",action:`${ii}/${KV}`})}finally{e(gm,!1)}},async[hm]({commit:t,dispatch:e,rootGetters:r},{id:n}){try{t(gm,!0);const{data:a}=await rpe(n);await e(vm,{companyUsers:[a]});const{id:o}=r["application/user"]||{};return n===o&&(be.locale!==a.locale&&be.l10n.changeLocale(a.locale),be.lang!==a.language&&(be.i18next.changeLanguage(a.language),location&&location.reload())),n}catch(a){return this.handleError(a,{object:"companyUser",objectId:n,fallbackCode:"companyUser.get",action:`${ii}/${hm}`,actionPayload:arguments[1]}),null}finally{t(gm,!1)}},async[dx]({commit:t,dispatch:e,rootGetters:r},{body:n}){try{const{language:a,locale:o}=r["application/user"]||{},i={language:a||"en",locale:o||"en-US",...n};t(oi,!0);const{data:s}=await npe(i);return await e(vm,{companyUsers:[s]}),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("sentThingTo",{thing:be.t("invitation"),recipient:s.email})}),s.id}catch(a){return this.handleError(a,{object:"companyUser",fallbackCode:"companyUser.post",action:`${ii}/${dx}`,actionPayload:arguments[1]}),null}finally{t(oi,!1)}},async[lx]({dispatch:t,commit:e,getters:r},{id:n,body:a}){var o;try{e(oi,!0);const{AvatarPublicId:i}=a,{AvatarPublicId:s}=r.byId(n);return i&&i!==s&&this.dispatch(vxe,{id:s}),await ape(n,a),await t(hm,{id:n}),(o=this.$supportChat)==null||o.syncData(),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("updatedThing",{thing:be.t("user")})}),n}catch(i){return this.handleError(i,{object:"companyUser",objectId:n,fallbackCode:"companyUser.put",action:`${ii}/${lx}`,actionPayload:arguments[1]}),null}finally{e(oi,!1)}},async[XV]({commit:t},{id:e}){try{return t(oi,!0),await ipe(e),t(q1.DELETE_COMPANY_USER,e),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("removedThing",{thing:be.t("user")}),actions:{undo:()=>{this.dispatch(`${ii}/${cx}`,{id:e})}}}),e}catch(r){return this.handleError(r,{object:"companyUser",objectId:e,fallbackCode:"companyUser.delete",action:`${ii}/${XV}`,actionPayload:arguments[1]}),null}finally{t(oi,!1)}},async[cx]({dispatch:t,commit:e},{id:r}){try{return e(oi,!0),await ope(r),await t(hm,{id:r}),r}catch(n){return this.handleError(n,{object:"companyUser",objectId:r,fallbackCode:"companyUser.patch",action:`${ii}/${cx}`,actionPayload:arguments[1]}),null}finally{e(oi,!1)}},[fxe]({commit:t,rootGetters:e}){let r="en";const n=e["application/user"];n.language&&({language:r}=n);const a={AvatarPublicId:null,CompanyId:null,CompanyUserPermission:{manageCompany:!1,manageUsers:!1,manageProjects:!1,manageOwnProjects:!1,showPrices:!1,manageAtas:!1,manageOwnAtas:!1,createTimeTracks:!0,readTimeTracks:!1,readOwnTimeTracks:!0,modifyTimeTracks:!1,modifyOwnTimeTracks:!0,deleteTimeTracks:!1,deleteOwnTimeTracks:!0,attestTimeTracks:!1,createInvoices:!1,readInvoices:!1,readOwnInvoices:!1,modifyInvoices:!1,modifyOwnInvoices:!1,deleteInvoices:!1,deleteOwnInvoices:!1,attestInvoices:!1,attestOwnInvoices:!1,exportInvoices:!1,modifyBookkeepingSettings:!1},cellphone:null,email:null,finishedGuide:!1,firstname:null,id:null,language:r,lastActive:null,lastname:null,resetPasswordExpires:null,resetPasswordToken:null};return t(`forms/${De.SET_FORM}`,{key:"companyUser",formData:a},{root:!0})},[mxe]({commit:t,getters:e},{id:r,props:n=[]}){const a=ha(e.byId(r),n);return t(`forms/${De.SET_FORM}`,{key:"companyUser",formData:a},{root:!0})},async[JV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyUser");let{id:n}=r;return n?await e(lx,{id:r.id,body:r}):n=await e(dx,{body:r}),await this.dispatch(hxe,"companyUser"),!0}catch(r){return this.handleError(r,{object:"companyUser",action:`${ii}/${JV}`,actionPayload:arguments[1]}),!1}}},{SET_COMPANY_USERS:yxe,DELETE_COMPANY_USER:_xe,CLEAR_COMPANY_USERS:bxe,SET_COMPANY_USERS_FETCHING:wxe,SET_COMPANY_USERS_POSTING:xxe}=q1,kxe={[yxe](t,{data:e=[]}){if(typeof e!="object")throw Error("Data must be a company user or an array of company users!");const r=Array.isArray(e)?e:[e],{ids:n,values:a}=Yl(r);Us(t.data,a),t.ids=Ji([...n,...t.ids])},[_xe](t,e){ce.delete(t.data,e);const r=t.ids.indexOf(e);r!==-1&&t.ids.splice(r,1)},[bxe](t){ce.set(t,"data",{}),ce.set(t,"ids",[])},[wxe](t,e){t.isFetching=e},[xxe](t,e){t.isPosting=e}},Pxe={namespaced:!0,state:cxe,getters:{referenceById:t=>e=>t.data[e],byId:t=>e=>{const r=t.data[e];if(!r)return null;const{firstname:n,lastname:a}=r;return{...r,fullName:`${n||""} ${a||""}`.trim(),role:sme(r.CompanyUserPermission),avatarUrl:`${Me.api.baseUrl}/file/${r.AvatarPublicId}/download`}},all:(t,e)=>{const r={};return t.ids.forEach(n=>{r[n]=e.byId(n)}),r},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching},actions:gxe,mutations:kxe},Txe={...{invoice:{},isFetchingInvoice:!1,isPostingInvoice:!1},companyUser:{},company:{},isFetching:!1,isPosting:!1},ym="settings",{FORM_RESET_OLD:Mxe}=Oe,{DO_LOAD_INVOICE_SETTINGS:fx,LOAD_INVOICE_SETTINGS:QV,DO_UPDATE_INVOICE_SETTINGS:mx,UPDATE_INVOICE_SETTINGS:ZV,FORM_EDIT_INVOICE_SETTINGS:ez,FORM_SUBMIT_INVOICE_SETTINGS:tz}=sV,{SET_INVOICE_SETTINGS_FETCHING:rz,SET_INVOICE_SETTINGS_POSTING:nz}=G1,{SET_SETTINGS:Sxe}=De.settings,{SET_FORM:Oxe}=De.forms,Exe={async[fx]({commit:t}){try{t(rz,!0);const{data:e}=await dpe();t(Sxe,{key:"invoice",settings:e})}catch(e){throw e}finally{t(rz,!1)}},async[QV]({dispatch:t}){try{await t(fx)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${ym}/${QV}`})}},async[mx]({dispatch:t,commit:e},{data:r}){try{e(nz,!0),await cpe(r),t(fx)}catch(n){throw n}finally{e(nz,!1)}},async[ZV]({dispatch:t},{data:e}){try{return await t(mx,{data:e}),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"settings.put",action:`${ym}/${ZV}`,actionPayload:arguments[1]}),!1}},async[ez]({commit:t,state:e},{props:r=[]}={}){try{const n=ha(e.invoice,r);return t(`forms/${Oxe}`,{key:"companyInvoiceSettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editInvoice",action:`${ym}/${ez}`,actionPayload:arguments[1]}),!1}},async[tz]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyInvoiceSettings"),{invoicePaymentAccountType:n}=r;return n==="bankgiro"?(r.invoicePaymentDomesticClearingNo=null,r.invoicePaymentDomesticAccountNo=null):n==="domesticBankAcc"&&(r.invoicePaymentBankGiro=null),await e(mx,{data:r}),await this.dispatch(Mxe,"companyInvoiceSettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitInvoice",action:`${ym}/${tz}`}),!1}}},si="settings",{FORM_RESET_OLD:az,DO_LOAD_INVOICE_SETTINGS:Dxe}=Oe,{DO_LOAD_ALL_SETTINGS:iz,LOAD_ALL_SETTINGS:oz,DO_LOAD_SETTINGS_COMPANY:_m,LOAD_SETTINGS_COMPANY:sz,LOAD_SETTINGS_COMPANYUSER:uz,UPDATE_SETTINGS:lz,DO_UPDATE_SETTINGS:Gl,FORM_EDIT_COMPANY_SETTINGS:dz,DO_LOAD_SETTINGS_COMPANYUSER:bm,FORM_SUBMIT_COMPANY_SETTINGS:cz,FORM_EDIT_COMPANY_USER_SETTINGS:fz,FORM_SUBMIT_COMPANY_USER_SETTINGS:mz}=uV,{SET_SETTINGS:px,SET_SETTINGS_FETCHING:wm,SET_SETTINGS_POSTING:pz}=De.settings,{SET_FORM:hz}=De.forms,vz=["ataTravel"],Cxe=["extraWorkPrice","extraWorkManagementPrice","extraEntrepreneurPercentage","extraOtherPercentage"],gz=t=>{const e=t;return Object.keys(e).forEach(r=>{vz.includes(r)&&e[r]==="0"?e[r]="":e[r]==="true"?e[r]=!0:e[r]==="false"?e[r]=!1:e[r]==="null"?e[r]=null:typeof e[r]!="boolean"&&!Number.isNaN(Number(e[r]))&&e[r]!==""&&(e[r]=Number(e[r]))}),e},xm=t=>{const e=[];return Object.keys(t).forEach(r=>{let n=t[r];t[r]===!0?n="true":t[r]===!1&&(n="false"),Cxe.includes(r)&&(n=Number(n)),vz.includes(r)&&(t[r]===!1||t[r]==="")?e.push({name:r,value:!1,type:"string"}):e.push({name:r,value:n})}),e},$xe={...Exe,async[iz]({dispatch:t}){await t(_m),await t(bm),await this.dispatch(Dxe)},async[oz]({dispatch:t}){try{await t(iz)}catch(e){this.handleError(e,{object:"settings",fallbackCode:"settings.get",action:`${si}/${oz}`})}},async[_m]({commit:t}){try{t(wm,!0);const{data:e}=await cr.get("/companySetting"),r=gz(e);t(px,{key:"company",settings:r});const{ataTitleKey:n}=e;n&&n!=="ata"&&be.i18next.addResources(be.i18next.language,"_common",{ata:`$t(${n})`,ataThe:`$t(${n}The)`})}catch(e){throw e}finally{t(wm,!1)}},async[sz]({dispatch:t}){try{await t(_m)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${si}/${sz}`})}},async[bm]({dispatch:t,commit:e}){var r;try{e(wm,!0);const{data:n}=await cr.get("/companyUserSetting"),a=gz(n);e(px,{key:"companyUser",settings:a});const{autoTriggerPurchaseEvent:o}=a;if(o){const{currency:i,amount:s,accountType:u}=o||{};(r=this.$trackevent)==null||r.call(this,"purchase",{currency:i,amount:s,accountType:u}),await t(Gl,{key:"companyUser",settings:xm({autoTriggerPurchaseEvent:null})})}}catch(n){throw n}finally{e(wm,!1)}},async[uz]({dispatch:t}){try{await t(bm)}catch(e){this.handleError(e,{object:"companyUserSettings",fallbackCode:"settings.get",action:`${si}/${uz}`})}},async[lz]({dispatch:t,commit:e},{key:r,settings:n}){try{if(!r)throw new Error("Missing valid parameter key");const a=xm(n);return e(px,{key:r,settings:n}),await t(Gl,{key:r,settings:a}),!0}catch(a){return this.handleError(a,{object:"setting",fallbackCode:"settings.put",action:`${si}/${lz}`,actionPayload:arguments[1]}),!1}},async[Gl]({dispatch:t,commit:e},{key:r,settings:n}){try{if(e(pz,!0),r==="company")await cr.post("/companySetting",n),t(_m);else if(r==="companyUser")await cr.post("/companyUserSetting",n),t(bm);else throw new Error(`Setting key: '${r}' is not valid, cannot update settings.`)}catch(a){throw a}finally{e(pz,!1)}},async[dz]({commit:t,state:e},{props:r=[]}={}){try{const n=ha(e.company,r);return t(`forms/${hz}`,{key:"companySettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editCompany",action:`${si}/${dz}`,actionPayload:arguments[1]}),!1}},async[cz]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companySettings"),n=xm(r);return await e(Gl,{key:"company",settings:n}),await this.dispatch(az,"companySettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitCompany",action:`${si}/${cz}`}),!1}},async[fz]({commit:t,state:e},{props:r=[]}={}){try{const n=ha(e.companyUser,r);return t(`forms/${hz}`,{key:"companyUserSettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editCompanyUser",action:`${si}/${fz}`,actionPayload:arguments[1]}),!1}},async[mz]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyUserSettings"),n=xm(r);return await e(Gl,{key:"companyUser",settings:n}),await this.dispatch(az,"companyUserSettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitCompanyUser",action:`${si}/${mz}`}),!1}}},{SET_INVOICE_SETTINGS_FETCHING:Axe,SET_INVOICE_SETTINGS_POSTING:Rxe}=G1,Ixe={[Axe](t,e){t.isFetchingInvoice=e},[Rxe](t,e){t.isPostingInvoice=e}},{SET_SETTINGS:Nxe,CLEAR_SETTINGS:Lxe,SET_SETTINGS_FETCHING:Wxe,SET_SETTINGS_POSTING:Fxe}=lV,jxe={...Ixe,[Nxe](t,{key:e,settings:r={}}){if(!t[e])throw Error(`${e} is not a valid key/type`);Object.keys(r).forEach(n=>{const a=r[n];ce.set(t[e],n,a)})},[Lxe](t,{key:e,name:r=null}){r?ce.delete(t[e],r):ce.set(t,e,{})},[Wxe](t,e){t.isFetching=e},[Fxe](t,e){t.isPosting=e}},Vxe={...{allInvoiceSettings:t=>t.invoice,getInvoiceSetting:t=>e=>{const r=t.invoice[e];return typeof r<"u"?r:null},isFetchingInvoice:t=>t.isFetchingInvoice,isPostingInvoice:t=>t.isPostingInvoice,isRegisteredForInvoicing:(t,e)=>e.getInvoiceSetting("isRegisteredForInvoicing")},allCompanySettings:t=>t.company,getCompanySetting:t=>e=>{const r=t.company[e];return typeof r<"u"?r:null},getCompanyUserSetting:t=>e=>{const r=t.companyUser[e];return typeof r<"u"?r:null},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching,allowHidePrice:(t,e)=>e.getCompanySetting("work_allowHidePrice"),hidePriceOnNewlyAddedArticles:(t,e)=>e.allowHidePrice&&e.getCompanySetting("work_default_hidePrice"),allowDocumentCustomSender:(t,e)=>e.getCompanySetting("allowProjectCustomSender"),allowHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("allowHideDocArticlePriceInput"),defaultHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("hideDocArticlePriceInput"),defaultVatRate:(t,e)=>e.getCompanySetting("defaultVatRate"),defaultCurrency:(t,e)=>e.getCompanyUserSetting("defaultCurrency"),documentSenderSign:(t,e)=>e.getCompanyUserSetting("documentSenderSign"),showOverviewOnboardingOverlay:(t,e)=>e.getCompanyUserSetting("showOverviewOnboardingOverlay"),reminderSettings:t=>{const e=t.company||{};return{notAnswered:e.defaultReminderRemindDays,notViewed:e.defaultReminderViewedDays,expires:e.defaultReminderExpireDays}},defaultDocumentTheme:t=>{const{documentThemeBackgroundFilter:e,documentThemePriceBackground:r,documentThemePrimaryColor:n,offerBrandingBackgroundUrl:a}=t.company||{};return{...e&&e!=="hsla(239,71%,89%,0)"&&{backgroundFilter:e},...r&&r!=="hsla(249,60%,34%,1)"&&{priceSummaryBackground:r},...n&&n!=="hsla(271,100%,38%,1)"&&{headingColor:n},...n&&n!=="hsla(271,100%,38%,1)"&&{headingColor:n},...a&&{background:a}}},isAuthenticatedCRM:(t,e)=>(r,n=null)=>({hubspot:[{key:"hubspotNativeTokens",type:"getCompanyUserSetting",appType:"native"},{key:"hubspotTokens",type:"getCompanyUserSetting",appType:"extension"}],upsales:[{key:"upsalesApiKey",type:"getCompanySetting"}],salesforce:[{key:"salesforceTokens",type:"getCompanyUserSetting"}],pipedrive:[{key:"pipedriveTokens",type:"getCompanyUserSetting"}]}[r]||[]).filter(o=>!n||o.appType===n).some(({key:o,type:i})=>{var s;return!!((s=e[i])!=null&&s.call(e,o))}),allAuthenticatedCRMs:(t,e)=>["hubspot","salesforce","pipedrive"].filter(r=>!!e.isAuthenticatedCRM(r)),isFortnoxInstalled:(t,e)=>!!e.getCompanySetting("fortnoxTokens")&&jn.checkFeature("fortnox")},zxe={namespaced:!0,state:Txe,getters:Vxe,actions:$xe,mutations:jxe},Uxe={...(()=>({isUploading:!1,article:{},document:{},document2:{},projectNote:{},company:{},companyBranding:{},companyUser:{},companyInvoiceSettings:{},companySettings:{},companyUserSettings:{},moduleArticles:[],modulePrices:{},file:{},invoice:{},invoiceNote:{},companyReference:{},companyReferenceItems:[],endCustomer:{},timeline:{},timeTrack:{TimeTrackSlots:[]},documentTerm:{},kycForm:{}}))()},{FORM_DOCUMENT_SET_CLIENT:yz,FORM_DOCUMENT_SUBMIT_CLIENT:Hxe}=Wn,{SET_FORM_VALUE:lo,REMOVE_FORM_VALUE:_z}=Fn,qxe={async[yz]({commit:t,getters:e,rootGetters:r},{formData:n}){if(!n)return t(lo,{key:"document.ModuleEndCustomer",value:null}),t(_z,"document.ModuleExtraCustomers"),!0;const a=Object.assign({},n);a.id=null,a.EndCustomerId=n.id,t(lo,{key:"document.ModuleEndCustomer",value:a});const o=e.documentField("ModuleExtraCustomers");a.customerType==="company"&&a.reference&&o&&o.length===0&&t(lo,{key:"document.ModuleExtraCustomers",value:{name:a.reference}});const i=r["settings/getCompanySetting"]("priceInputCompany"),s=r["settings/getCompanySetting"]("priceInputDefault");return a.customerType==="company"&&i?t("application/updateField",{path:"priceInputVat",value:i},{root:!0}):a.customerType==="individual"&&s&&t("application/updateField",{path:"priceInputVat",value:s},{root:!0}),!0},async[Hxe]({commit:t,dispatch:e,rootGetters:r},{mode:n="create"}={}){let a=null;if(n==="edit"){const o=r["forms/documentField"]("ModuleEndCustomer"),i=r["forms/getFormByKey"]("endCustomer");if(!o)throw new Error("Could not find the old client");if(!i)throw new Error("Could not find the new client");if(o.customerType==="individual"&&i.customerType==="company")t(_z,"document.ModuleExtraCustomers"),t(lo,{key:"document.ModuleExtraCustomers",value:{name:i.reference}});else if(i.customerType==="company"){const s=r["forms/documentField"]("ModuleExtraCustomers");s&&s[0]?t(lo,{key:"document.ModuleExtraCustomers[0]",value:{name:i.reference}}):t(lo,{key:"document.ModuleExtraCustomers",value:{name:i.reference}})}a=Object.assign({},i,{id:i.EndCustomerId}),i.doUpdateEndCustomer&&(t(lo,{key:"endCustomer",value:a}),await e(`endCustomers/${ga.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}))}else{const o=await e(`endCustomers/${ga.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}),i=r["endCustomers/endCustomerById"](o);if(!i)throw new Error("Could not find the endCustomer");a=Object.assign({},i)}return await e(yz,{formData:a}),!0}};var bz={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ct,function(){Array.isArray||(Array.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"});function r(o){for(var i=[],s=0,u=o.length;s<u;s++)i.indexOf(o[s])===-1&&i.push(o[s]);return i}var n={},a={"==":function(o,i){return o==i},"===":function(o,i){return o===i},"!=":function(o,i){return o!=i},"!==":function(o,i){return o!==i},">":function(o,i){return o>i},">=":function(o,i){return o>=i},"<":function(o,i,s){return s===void 0?o<i:o<i&&i<s},"<=":function(o,i,s){return s===void 0?o<=i:o<=i&&i<=s},"!!":function(o){return n.truthy(o)},"!":function(o){return!n.truthy(o)},"%":function(o,i){return o%i},log:function(o){return console.log(o),o},in:function(o,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(o)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(o,i,s){if(s<0){var u=String(o).substr(i);return u.substr(0,u.length+s)}return String(o).substr(i,s)},"+":function(){return Array.prototype.reduce.call(arguments,function(o,i){return parseFloat(o,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(o,i){return parseFloat(o,10)*parseFloat(i,10)})},"-":function(o,i){return i===void 0?-o:o-i},"/":function(o,i){return o/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(o,i){return o.concat(i)},[])},var:function(o,i){var s=i===void 0?null:i,u=this;if(typeof o>"u"||o===""||o===null)return u;for(var l=String(o).split("."),d=0;d<l.length;d++)if(u==null||(u=u[l[d]],u===void 0))return s;return u},missing:function(){for(var o=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,s=0;s<i.length;s++){var u=i[s],l=n.apply({var:u},this);(l===null||l==="")&&o.push(u)}return o},missing_some:function(o,i){var s=n.apply({missing:i},this);return i.length-s.length>=o?[]:s}};return n.is_logic=function(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===1},n.truthy=function(o){return Array.isArray(o)&&o.length===0?!1:!!o},n.get_operator=function(o){return Object.keys(o)[0]},n.get_values=function(o){return o[n.get_operator(o)]},n.apply=function(o,i){if(Array.isArray(o))return o.map(function(v){return n.apply(v,i)});if(!n.is_logic(o))return o;var s=n.get_operator(o),u=o[s],l,d,f,m,c;if(Array.isArray(u)||(u=[u]),s==="if"||s=="?:"){for(l=0;l<u.length-1;l+=2)if(n.truthy(n.apply(u[l],i)))return n.apply(u[l+1],i);return u.length===l+1?n.apply(u[l],i):null}else if(s==="and"){for(l=0;l<u.length;l+=1)if(d=n.apply(u[l],i),!n.truthy(d))return d;return d}else if(s==="or"){for(l=0;l<u.length;l+=1)if(d=n.apply(u[l],i),n.truthy(d))return d;return d}else{if(s==="filter")return m=n.apply(u[0],i),f=u[1],Array.isArray(m)?m.filter(function(v){return n.truthy(n.apply(f,v))}):[];if(s==="map")return m=n.apply(u[0],i),f=u[1],Array.isArray(m)?m.map(function(v){return n.apply(f,v)}):[];if(s==="reduce")return m=n.apply(u[0],i),f=u[1],c=typeof u[2]<"u"?u[2]:null,Array.isArray(m)?m.reduce(function(v,g){return n.apply(f,{current:g,accumulator:v})},c):c;if(s==="all"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!1;for(l=0;l<m.length;l+=1)if(!n.truthy(n.apply(f,m[l])))return!1;return!0}else if(s==="none"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!0;for(l=0;l<m.length;l+=1)if(n.truthy(n.apply(f,m[l])))return!1;return!0}else if(s==="some"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!1;for(l=0;l<m.length;l+=1)if(n.truthy(n.apply(f,m[l])))return!0;return!1}}if(u=u.map(function(v){return n.apply(v,i)}),a.hasOwnProperty(s)&&typeof a[s]=="function")return a[s].apply(i,u);if(s.indexOf(".")>0){var p=String(s).split("."),h=a;for(l=0;l<p.length;l++){if(!h.hasOwnProperty(p[l]))throw new Error("Unrecognized operation "+s+" (failed at "+p.slice(0,l+1).join(".")+")");h=h[p[l]]}return h.apply(i,u)}throw new Error("Unrecognized operation "+s)},n.uses_data=function(o){var i=[];if(n.is_logic(o)){var s=n.get_operator(o),u=o[s];Array.isArray(u)||(u=[u]),s==="var"?i.push(u[0]):u.forEach(function(l){i.push.apply(i,n.uses_data(l))})}return r(i)},n.add_operation=function(o,i){a[o]=i},n.rm_operation=function(o){delete a[o]},n.rule_like=function(o,i){if(i===o||i==="@")return!0;if(i==="number")return typeof o=="number";if(i==="string")return typeof o=="string";if(i==="array")return Array.isArray(o)&&!n.is_logic(o);if(n.is_logic(i)){if(n.is_logic(o)){var s=n.get_operator(i),u=n.get_operator(o);if(s==="@"||s===u)return n.rule_like(n.get_values(o,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(o)){if(i.length!==o.length)return!1;for(var l=0;l<i.length;l+=1)if(!n.rule_like(o[l],i[l]))return!1;return!0}else return!1;return!1},n})})(bz);var Bxe=y0,Yxe=am,Gxe=b0,wz=la,Kxe=Ws;function Xxe(t,e,r,n){if(!wz(t))return t;e=Yxe(e,t);for(var a=-1,o=e.length,i=o-1,s=t;s!=null&&++a<o;){var u=Kxe(e[a]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=i){var d=s[u];l=n?n(d,u,s):void 0,l===void 0&&(l=wz(d)?d:Gxe(e[a+1])?[]:{})}Bxe(s,u,l),s=s[u]}return t}var Jxe=Xxe,Qxe=Jxe;function Zxe(t,e,r){return t==null?t:Qxe(t,e,r)}var Xt=Zxe;function eke(t,e){let r=0;const n=[];for(const[a,o]of t.entries()){const{code:i,data:s}=o;if(i===e){const u=n.slice(r).find(({code:l,data:d})=>{if(l!==i)return!1;const f=te(d,"client.id"),m=te(s,"client.id"),c=te(d,"email"),p=te(s,"email");return f===m&&m!==void 0||c===p&&p!==void 0});u?(u.children=[...u.children,o],u.createdAt=o.createdAt):n.push({...o,children:[]})}else i==="sent"&&(r=a?a-1:0),n.push(o)}return n}const xz=({nodes:t,data:e})=>{const r=[];return t.forEach(n=>{const a=n.isVisible?eme(n.isVisible,["_uniqueId"]):!1;(!a||bz.exports.apply(a,e))&&r.push(n),n&&Array.isArray(n.children)&&n.children.length&&(n.children=xz({nodes:n.children,data:e}))}),r},kz={rot:{max:5e4*100,ratio:.3},rut:{max:75e3*100,ratio:.5},greenRot15:{max:5e4*100,ratio:.15},greenRot50:{max:5e4*100,ratio:.5}},Pz=(t,e,r)=>{if(!kz[t])throw new Error("Missing param type");const{max:n,ratio:a}=kz[t];return Math.min(r*n,e*a)},km=({type:t="fixed",currency:e,maxTotal:r=null,articles:n=[],clients:a=[],region:o={},useVat:i,rounding:s})=>{if(typeof i>"u")throw new Error("Missing param useVat");if(typeof i!="boolean")throw new Error("Param useVat must be a boolean");if(typeof s!="object"||s===null)throw new Error("Param rounding must be a object");if(typeof s.enabled>"u")throw new Error("Missing param rounding.enabled");if(typeof s.enabled!="boolean")throw new Error("Param rounding.enabled must be a boolean");if(typeof s.interval>"u")throw new Error("Missing param rounding.interval");if(typeof s.interval!="number")throw new Error("Param rounding.interval must be a number");if(typeof s.show>"u")throw new Error("Missing param rounding.show");if(typeof s.show!="boolean")throw new Error("Param rounding.show must be a boolean");const u={type:t,subTotal:0,taxAmount:0,roundingAmount:0,total:0,currency:e,maxTotal:t==="openAccMaxPrice"?r||0:null,region:{country:"sweden",houseWorkType:null,reverseVat:!!a.find(f=>te(f,"region.reverseVat")),houseWorkManualAmount:o.houseWorkManualAmount||null,houseWorkWork:0,houseWorkAmount:o.houseWorkManualAmount||o.houseWorkAmount||null},helpers:{discount:0,isIndivid:!a.find(f=>f.type==="company"),noOfClients:a.length||1},useVat:i,rounding:{enabled:s.enabled,interval:s.interval,show:s.show}},l=f=>f/100;if(u.helpers.isIndivid&&!u.region.reverseVat){const f=[...n].sort((m,c)=>new Date(c.updatedAt).getTime()-new Date(m.updatedAt).getTime()).find(Qw);f&&!u.region.houseWorkType&&(u.region.houseWorkType=Kj(f))}for(let f of n){f=Xi(f);const{totalAmount:m,currency:c,priceType:p,discount:h,discountType:v}=f;let{vat:g}=f;i||(g=0),["fixed","approx"].includes(p)&&(u.currency=c,u.subTotal+=m,u.taxAmount+=m*l(g),u.helpers.discount+=v==="percentage"?m/((100-h/100)/100)-m:h,u.region.houseWorkType&&Qw(f)&&(u.region.houseWorkWork+=m*((100+g)/100)))}!u.helpers.isIndivid&&u.region.reverseVat&&(u.taxAmount=0),u.region.houseWorkType&&u.region.houseWorkAmount===null&&(u.region.houseWorkAmount=Pz(u.region.houseWorkType,u.region.houseWorkWork,u.helpers.noOfClients));const d=u.subTotal+u.taxAmount-u.region.houseWorkAmount;return u.roundingAmount=s.enabled&&s.interval?Math.round(d/s.interval)*s.interval-d:0,u.total=d+u.roundingAmount,Jw(u),u},tke=t=>{if(!t)return null;const{currency:e,clients:r=[],articles:n=[]}=t,a=te(t,"data.packageGroups",{}),o=te(t,"data.formSettings.useVat",!0),i={enabled:te(t,"data.formSettings.rounding.enabled",!1),interval:te(t,"data.formSettings.rounding.interval",1),show:te(t,"data.formSettings.rounding.show",!0)},s=[],u=[];let l=null,d=null,f=null;if(Object.keys(a).forEach(h=>{const v=a[h].packages.filter(({isSelected:_})=>_);u.push(...v.map(({packageId:_})=>_));const g=te(v,"[0].data.prices.type","fixed");s.push(...Array.isArray(g)?g:[g]),v.forEach(_=>{const{maxTotal:y=null,region:b}=te(_,"data.prices")||{};g==="openAccMaxPrice"&&!Number.isNaN(Number.parseInt(y,10))&&(l+=y),b&&!Number.isNaN(Number.parseInt(b.houseWorkManualAmount,10))&&(d+=b.houseWorkManualAmount)})}),!s.length){const h=te(t,"data.prices.type","fixed");s.push(...Array.isArray(h)?h:[h])}const m=n.filter(({packageId:h})=>!h||u.includes(h)),c=m.filter(Qw),p={};for(let h of c){h=Xi(h);const v=Kj(h),g=o?h.vat:0;p[v]||(p[v]=null),p[v]+=h.totalAmount*((100+g)/100)}for(const[h,v]of Object.entries(p))v&&(f+=Pz(h,v,r.length||1));return{...km({currency:e,articles:m,clients:r,region:{country:"sweden",houseWorkManualAmount:d,houseWorkAmount:f},useVat:o,rounding:i}),type:s,maxTotal:l}},rke=t=>{const e=a=>be.t(`_common:documentMentions.${a}`),r=!!te(t,"clients.0"),n={clientName:{key:"clients.0.name",meta:{inputDisabled:!r,virtual:!0}},clientEmail:{key:"clients.0.email",meta:{inputDisabled:!r,virtual:!0}},clientPhone:{key:"clients.0.cellphone",meta:{inputDisabled:!r,virtual:!0}},clientCompany:{key:"clients.0.companyName",meta:{inputDisabled:!r,virtual:!0}},clientAddress:{key:"clients.0.addresses.standard.street",meta:{inputDisabled:!r,virtual:!0}},clientZip:{key:"clients.0.addresses.standard.zip",meta:{inputDisabled:!r,virtual:!0}},clientCity:{key:"clients.0.addresses.standard.city",meta:{inputDisabled:!r,virtual:!0}},clientSocialNo:{key:"clients.0.socialNo",meta:{inputDisabled:!0,virtual:!0}},clientOrgNo:{key:"clients.0.orgNo",meta:{inputDisabled:!0,virtual:!0}},senderName:{key:"companyUser.fullName",meta:{inputDisabled:!0,virtual:!0}},senderEmail:{key:"companyUser.email",meta:{inputDisabled:!0,virtual:!0}},senderPhone:{key:"companyUser.cellphone",meta:{inputDisabled:!0,virtual:!0}},senderCompany:{key:"company.name",meta:{inputDisabled:!0,virtual:!0}},senderAddress:{key:"company.street",meta:{inputDisabled:!0,virtual:!0}},senderZip:{key:"company.zip",meta:{inputDisabled:!0,virtual:!0}},senderCity:{key:"company.city",meta:{inputDisabled:!0,virtual:!0}},documentName:{key:"data.name",meta:{inputDisabled:!1,virtual:!0}}};for(const a of Object.keys(n))n[a].label=e(a),n[a].value=te(t,n[a].key)||"";return n},Kl=t=>t?Object.keys(t).reduce((e,r)=>t[r]||t[r]===!1?{...e,[r]:t[r]}:e,{}):{};function nke(t,e){if(typeof e!="object"||e===null)throw Error("Param pdfFile must be an object");const{name:r,url:n,mime:a,fileId:o}=e;if(!r||!n||!a||!o)throw Error("Param pdfFile must include name, url, mime and fileId");if(!t)return null;const i=te(t,"template.views.read.nodes")||[],s=On.exports(),u=Array(2).fill().map(()=>On.exports());return i.push({itemId:"sectionPdf",itemType:"section",value:null,parentId:"0",nodeId:u[0]},{itemId:"pdf",itemType:"pdf",value:{file:`data.pdf-file-${s}`},parentId:u[0],nodeId:u[1]}),Xt(t,`data.pdf-file-${s}`,e),Xt(t,`template.validationSchema.properties.data.properties.pdf-file-${s}`,{anyOf:[{$ref:`${Me.api.baseUrl}/schemas/file/1.json`},{type:"null"}]}),t}function ake(t){if(!t)return null;const e=te(t,"template.views.read.nodes")||[];if(e.find(n=>n.itemType==="answer"))return t;e.push({itemId:"answer",itemType:"answer",value:{defaultAnswerMethod:"data.defaultAnswerMethod"},parentId:"0",nodeId:On.exports()}),Xt(t,"template.views.read.nodes",e);const r="template.validationSchema.properties.data.properties.defaultAnswerMethod";return te(t,r)||Xt(t,r,{default:{accept:"signature",deny:"button"},$ref:`${Me.api.baseUrl}/schemas/answer/1.json`}),t}const ike=t=>{if(!t)return null;let e=(t||"").replace(/^SE|[-]/g,"").trim();return e.length===12&&(e=e.substring(2)),`SE${e}01`},hx=()=>{const t=["email"];return jn.checkFeature("sms")&&jn._isValidCompanySetting("deliveryDefaultSms")&&t.push("sms"),{region:{country:"sweden"},permissions:{write:["clients[*].socialNo","clients[0].region.propertyDesignation","data.rejectReasons","data.packageGroups[*].packages[*].isSelected"]},answer:null,deliveryTypes:t,documentRole:"signee",answerMethod:{accept:"signature",deny:"button"},signOrder:0,_uniqueId:On.exports()}},vx=(t,e)=>{const r={endCustomerId:t.id,type:t.customerType,name:t.customerType==="individual"?t.name:t.reference,socialNo:t.customerType==="individual"?t.org_no:null,companyName:t.customerType==="company"?t.name:null,orgNo:t.customerType==="company"?t.org_no:null,email:t.email,cellphone:t.cellphone,cellphoneRegion:t.cellphoneRegion,addresses:{...t.street||t.zip||t.city?{standard:{street:t.street,zip:`${t.zip||""}`,city:t.city,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{},...t.workStreet||t.workZip||t.workCity?{work:{street:t.workStreet,zip:`${t.workZip||""}`,city:t.workCity,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{}},vatNumber:t.vatNumber,region:{...e&&e.region,reverseVat:t.reverseVat&&t.customerType==="company"},documentRole:te(e,"documentRole","signee"),signOrder:te(e,"signOrder",0)};return{...hx(),...e,...r}},gx=(t={})=>{const e=t,r=te(e,"addresses.standard",{}),n=te(e,"addresses.work",{});return{id:e.endCustomerId,EndCustomerId:e.endCustomerId,customerType:e.type||"individual",name:e.type==="individual"?e.name:e.companyName,email:e.email,cellphone:e.cellphone,cellphoneRegion:e.cellphoneRegion,org_no:e.type==="individual"?e.socialNo:e.orgNo,street:r.street,zip:r.zip,city:r.city,workStreet:n.street,workZip:n.zip,workCity:n.city,vatNumber:e.vatNumber||ike(e.orgNo)||"",separateWorkAddress:!!Object.keys(n).length,reverseVat:te(e,"region.reverseVat",!1),longitude:te(e,"addresses[0].longitude",null),latitude:te(e,"addresses[0].latitude",null),reference:e.type==="company"?e.name:null}},oke=({background:t,backgroundFilter:e,priceSummaryBackground:r,showPriceSummary:n})=>({resourceUrl:t,overlayColor:e,backgroundColor:r,showPriceSummary:n}),ske=({header:t={},theme:e={}})=>{const{resourceUrl:r="",title:n="",backgroundColor:a="",overlayColor:o="",showPriceSummary:i}={...oke(e),...t};return{layout:"price",baseStyle:{textColor:"",textAlign:"left"},items:[{type:"content",size:50,media:{type:"color",backgroundColor:a},value:{preText:"",documentName:n?`<h1>${n}</h1>`:"",postText:"",showLogo:!0,logotype:""}},{type:"media",size:50,media:{type:"image",resourceUrl:r,overlay:!0,overlayColor:o}}],...typeof i=="boolean"&&{showPriceSummary:i}}},uke=(t,e={})=>(!t||!t.data||te(t,"template.views.read.nodes",[]).filter(n=>n.itemType==="header"&&!!n.value.header).map(n=>n.value.header.substring(5)).forEach(n=>{if(t.data[n]&&t.data[n].layout==="legacy"){const a={...e,...Kl(t.data.theme)};t.data[n]=ske({header:{...t.data[n],title:te(t,"data.name","")},theme:a})}}),t),lke={isHouseWorkAuto:!0,rotAmount:null,rutAmount:null,persons:[],propertyType:null,realEstateId:null,condominiumId:null,condominiumOrgNo:null,isExported:!1,isProcessed:!1},Xl={id:{$default:null,$type:Number,$scope:["invoice"]},publicId:{$default:null,$type:String},status:{$default:"draft",$type:String,$scope:["invoice"]},subStatus:{$default:null,$type:String},type:{$default:"invoice",$type:String,$scope:["invoice"]},invoiceNumber:{$default:null,$type:String,$scope:["invoice"]},ocr:{$default:null,$type:Number},ourReference:{$default:null,$type:String,$scope:["invoice"]},yourReference:{$default:null,$type:String,$scope:["invoice"]},invoiceDate:{$default:D5(new Date).toISOString(),$type:Date,$scope:["invoice"]},dueDays:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"dueDays",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceDueDays")||null}}]},dueDate:{$default:null,$type:Date,$scope:["invoice"],$virtual:[{name:"dueDate",set(t,{getters:e}){if(t!==null)return t;const r=e["settings/getInvoiceSetting"]("invoiceDueDays")||1;return Jc(jse(al(Xl.invoiceDate.$default),r)).toISOString()}}]},deliveryDate:{$default:null,$type:Date,$scope:["invoice"]},sentAt:{$default:null,$type:Date},attestedAt:{$default:null,$type:Date},disputedAt:{$default:null,$type:Date},salesRequestedAt:{$default:null,$type:Date},pausedAt:{$default:null,$type:Date},interestType:{$default:"noInterest",$type:String,$scope:["invoice"],$virtual:[{name:"interestType",set(t,{getters:e}){return e["settings/getInvoiceSetting"]("invoiceInterestPercentage")?"fixed":"noInterest"}}]},interestPercentage:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"interestPercentage",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceInterestPercentage")||null}}]},interestStartInDaysAfterDueDate:{$default:0,$type:Number,$scope:["invoice"]},invoiceFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"invoiceFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceFee")||null}}]},reminderFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"reminderFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceReminderFee")||null}}]},deliveryTypes:{$default:["email"],$type:Array,$scope:["invoice"]},totalAmount:{$default:0,$type:Number},remainingAmount:{$default:0,$type:Number},paidAmount:{$default:0,$type:Number},creditedAmount:{$default:0,$type:Number},writeOffAmount:{$default:0,$type:Number},reminderAmount:{$default:0,$type:Number},totalVatAmount:{$default:0,$type:Number},centRoundingAmount:{$default:0,$type:Number},transferAmount:{$default:0,$type:Number},currency:{$default:"SEK",$type:String},partnerPdfId:{$default:null,$type:String},ModuleArticles:{$default:[],$type:Array,$scope:["invoice"]},ModuleEndCustomer:{$default:null,$type:Object,$scope:["invoice"]},ModuleBranding:{$scope:["invoice"],$type:Object,$default:{message:null,useMessageEmail:!0}},InvoiceFiles:{$scope:["invoice"],$type:Array,$default:[]},InvoiceRegionSweden:{$default:lke,$type:Object,$scope:["invoice"]},ModuleScheduledDeliveries:{$scope:["invoice"],$type:Array,$default:[{type:"viewed",sendDays:null,sendType:"email",sendAt:null,status:"new"}],$virtual:[{name:"ModuleScheduledDeliveries",set(t,{getters:e}){return this.type==="credit"?[]:e["settings/getCompanySetting"]("invoiceReminderActive")?t.map(a=>{const o=a;if(o.sendDays!==null)return o;let i=null;return o.type==="viewed"&&(i=e["settings/getCompanySetting"]("invoiceReminderDefaultViewedDays")),i!==null&&(o.sendDays=i),o}):[]}}]},CompanyId:{$default:null,$type:"ref",$ref:"companies",$scope:["invoice"]},CompanyUserId:{$default:null,$type:"ref",$ref:"companyUsers",$scope:["invoice"]},creditsInvoiceId:{$default:null,$type:"ref",$ref:"invoices",$scope:["invoice"]},object:{$default:null,$type:String,$scope:["invoice"]},objectId:{$default:null,$type:Number,$scope:["invoice"]},documentId:{$default:null,$type:String,$scope:["invoice"]},projectId:{$default:null,$type:Number,$scope:["invoice"]},createdAt:{$default:null,$type:Date},updatedAt:{$default:null,$type:Date},deletedAt:{$default:null,$type:Date}};class yx{constructor(e,r){if(!e)throw Error("Missing argument invoice");if(!r)throw Error("Missing argument getters");this._getters=r,this._invoice=e}get id(){return this.getProperty("id")||null}get publicId(){return this.getProperty("publicId")||null}get pdfPath(){if(this.status==="draft"||this.isSale)return null;const e=this.latestReminder;if(e){const{id:r}=e;return`${Me.api.baseUrl}/public/invoice/${this.publicId}/pdf/reminder/${r}`}return`${Me.api.baseUrl}/public/invoice/${this.publicId}/pdf`}getCompany(){const{_getters:e}=this,r=this.getProperty("CompanyId")||{};return e["companies/companyById"](r)}getCompanyUser(){const{_getters:e}=this,r=this.getProperty("CompanyUserId")||{};return e["companyUsers/byId"](r)}get status(){return this.getProperty("status")}get visualStatus(){return this.getProperty("transferAmount")?"paying":this.status}get subStatus(){return this.getProperty("subStatus")}get type(){return this.getProperty("type")}get projectId(){return this.getProperty("projectId")||null}get document(){return this.documentId?this._getters["documents2/byId"](this.documentId):null}get documentId(){return this.getProperty("documentId")}get client(){return this.getProperty("ModuleEndCustomer")||null}get files(){return this.getProperty("InvoiceFiles")}get totalAmount(){return this.getProperty("totalAmount")}get totalVatAmount(){return this.getProperty("totalVatAmount")}get totalExVat(){return this.totalAmount-this.totalVatAmount}get paidAmount(){return this.getProperty("paidAmount")}get sentAt(){return this.getProperty("sentAt")}get dueDate(){const e=this.latestReminder;return e?e.dueDate:this.getProperty("dueDate")}get invoiceDate(){const e=this.latestReminder;return e?e.invoiceDate:this.getProperty("invoiceDate")}get invoiceNumber(){return this.getProperty("invoiceNumber")}get reminders(){return this.getProperty("InvoiceReminders")||[]}get latestReminder(){const e=this.reminders;return e.length?e[e.length-1]:null}get canDispute(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)&&!this.isDisputed}get canRegisterPayment(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canRegisterWriteOff(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canSendReminder(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canCredit(){const e=this.getProperty("id"),r=this.getProperty("type")==="credit";return e&&this.isAttested&&!r&&!["draft","salesRequest"].includes(this.status)}get canSell(){return this.id&&!this.isAttested&&!["salesRequest"].includes(this.status)}get canCancelSell(){return this.id&&this.isAttested&&["salesRequest"].includes(this.status)}get creditsInvoice(){const{_getters:e}=this,r=this.getProperty("creditsInvoice")||null;return e["invoices/byId"](r)}get creditInvoices(){const{_getters:e}=this;return(this.getProperty("creditInvoices")||[]).map(a=>e["invoices/byId"](a))}get interestInvoiceTo(){const{_getters:e}=this,r=this.getProperty("interestForInvoiceId")||null;return e["invoices/byId"](r)}get interestInvoices(){const{_getters:e}=this;return(this.getProperty("interestInvoices")||[]).map(a=>e["invoices/byId"](a))}get isDisputed(){return!!this.getProperty("disputedAt")}get isAttested(){return!!this.getProperty("attestedAt")}get isReverseVat(){const e=this.getProperty("ModuleEndCustomer")||null;return e?e.reverseVat:!1}get events(){const e=this.getProperty("Events")||[],r=[];return e.forEach(n=>{const a={type:n.type};n.EventData.forEach(o=>{a[o.name]=o.value}),r.push({name:n.code==="sentSms"?"sent":n.code,timestamp:n.createdAt,data:a,counter:n.counter})}),r}get articles(){return Xi(this.getProperty("ModuleArticles")||[])}get totalNetAmount(){const{articles:e}=this;return e.reduce((n,a)=>n+a.totalAmount,0)}get currency(){return"SEK"}get invoiceRegionSweden(){return this.getProperty("InvoiceRegionSweden")||{}}get rotAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rotAmount:r}=e;return r||0}get rutAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rutAmount:r}=e;return r||0}get invoiceFee(){return this.getProperty("invoiceFee")||0}get isSale(){return!!(["salesRequest","sold"].includes(this.status)||this.getProperty("salesRequestAcceptedAt"))}getScheduledDeliveries({type:e,status:r}={}){let n=this.getProperty("ModuleScheduledDeliveries")||null;return!n||!n.length?[]:(e&&(n=n.filter(a=>a.type===e)),r&&(n=n.filter(a=>a.status===r)),n)}getProperty(e=""){return e.replace(/\[(.*)\]/ig,(a,o)=>`.${o}`).split(".").reduce((a,o)=>a&&(typeof a[o]!="object",a[o]),this._invoice)}getProperties({scope:e=null,includeVirtual:r=!1}={}){const n=Xl,{_getters:a}=this;return axe({schema:n,getters:a,data:this._invoice,scope:e,includeVirtual:r,instance:this})}getVirtualProperties({scope:e=null}={}){const r=Xl,{_getters:n}=this;return YV({schema:r,getters:n,data:this._invoice,scope:e,instance:this})}}Ut(yx,"schema",Xl);const{DO_LOAD_INVOICE:Tz,DO_UPDATE_INVOICE:dke,DO_CREATE_INVOICE:cke,DO_ATTEST_INVOICE:fke,DO_SELL_INVOICE:mke,LOAD_FILE:pke,FORM_CLEAR_FORM:hke,FORM_RESET_OLD:vke,DO_LOAD_DOCUMENT2:Mz,UPDATE_VIEW_SETTINGS:gke,LOAD_INVOICE_SETTINGS:yke}=Oe,{SET_FORM:Jl,SET_FORM_VALUE:_ke}=De.forms,{DELETE_MANY_INVOICES:bke}=De.invoices,{LOAD_INVOICE_FORM:wke,LOAD_CREDIT_INVOICE_FORM:xke,LOAD_DOCUMENT2_INVOICE_FORM:kke,LOAD_CAMPAIGN_INVOICE_FORM:Pke,SUBMIT_INVOICE_FORM:Tke,SET_KYC_FORM:Mke,DO_SAVE_KYC_FORM:Ske}=aV,ui=(t,e)=>{t(gke,{view:"newInvoice",settings:{isLoading:e}})};async function _x({id:t=null,rootState:e,state:r,rootGetters:n,dispatch:a,projectId:o=null,documentId:i=null}){if(!e)throw new Error("Missing parameter rootState");if(!r)throw new Error("Missing parameter state");if(!n)throw new Error("Missing parameter rootGetters");if(!a)throw new Error("Missing parameter dispatch");let s=!1;const u=r.document;if(Object.keys(u).length!==0){const{name:l,params:d}=e.route||{};let{id:f}=d||{};f=Number.parseInt(f,10);const m=n["forms/documentField"]("id"),c=n["forms/documentField"]("documentType"),p=n["forms/documentField"]("type"),h=n["forms/documentField"]("projectId"),v=n["forms/documentField"]("documentId");if(c||(l==="invoiceNew"?!m&&!t&&p!=="credit"&&o===h&&(Tt.debug("INVOICE_FORM: Using existing store data as no ids was found"),s=!0):l==="invoiceEdit"?m&&m===f&&m===t&&p!=="credit"&&(Tt.debug("INVOICE_FORM: Using existing store data existing id match route"),s=!0):l==="invoiceCredit"?p==="credit"&&!t&&!m&&(Tt.debug("INVOICE_FORM: Using existing store data existing id match route"),s=!0):l==="invoiceDocument"&&v&&v===i&&(Tt.debug("INVOICE_FORM: Using existing store data as existing documentId match"),s=!0)),s){Tt.debug("INVOICE_FORM: Dont reload as forms/document is already defined");const g=n["forms/documentField"]("InvoiceFiles");g&&ot(g)==="array"&&g.forEach(_=>a(pke,{id:_.FileId},{root:!0}))}}return s}function Ql({rootState:t,rootGetters:e},r={}){const n=new yx(r,e).getProperties({includeVirtual:!0}),a={ModuleArticles:[e["articles/getNewArticle"]({name:"",price:0})]};return{...n,...a,CompanyId:t.application.user.companyId,CompanyUserId:t.application.user.userId}}const Oke={async[xke]({state:t,rootGetters:e,rootState:r,dispatch:n},{creditsInvoiceId:a}){try{if(ui(this.dispatch,!0),await _x({id:null,rootState:r,state:t,rootGetters:e,dispatch:n}))return;let i=Ql({rootState:this.state,rootGetters:e},{type:"credit"});if(!a)throw new Error("Missing parameter creditsInvoiceId");await this.dispatch(Tz,{id:a});const s=this.getters["invoices/byId"](a);if(!s)throw Tt.event({type:"invoiceCredit",status:"failed",data:{id:a},error:"Tried to load invoice to credit that does not exist!"}),new Error(`Could not find original invoice by id: '${a}'`);s.documentId&&!this.getters["documents2/byId"](s.documentId)&&await this.dispatch(Mz,{id:s.documentId});const u=ha(s.getProperties({scope:"invoice",includeVirtual:!0}),["ModuleArticles","ModuleBranding","ourReference","yourReference","invoiceFee","deliveryTypes","ModuleEndCustomer","InvoiceRegionSweden","object","objectId","documentId","projectId"]);i={...i,...u,type:"credit",creditsInvoiceId:a,invoiceDate:Jc(new Date).toISOString(),dueDate:Jc(new Date).toISOString()},i.invoiceFee&&(i.invoiceFee=-i.invoiceFee),i.ModuleArticles&&(i.ModuleArticles=i.ModuleArticles.map(l=>{const d=ei(l,["id","createdAt","updatedAt","deletedAt","object","ObjectId"]);return d.price=-d.price,d.houseWorkHoursToReport&&(d.houseWorkHoursToReport*=-1),d})),i.ModuleBranding&&(i.ModuleBranding=ei(i.ModuleBranding,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),i.ModuleEndCustomer&&(i.ModuleEndCustomer=ei(i.ModuleEndCustomer,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),i.InvoiceRegionSweden&&(i.InvoiceRegionSweden=ha(i.InvoiceRegionSweden,["condominiumId","condominiumOrgNo","isHouseWorkAuto","persons","propertyType","realEstateId"]),i.InvoiceRegionSweden&&!i.InvoiceRegionSweden.isHouseWorkAuto&&(i.InvoiceRegionSweden.persons=(i.InvoiceRegionSweden.persons||[]).map(l=>({...l,amount:-l.amount})))),this.commit(`forms/${Jl}`,{key:"document",formData:i}),Tt.event({type:"invoiceCredit",status:"success",data:{id:a}}),Tt.debug("Credit invoice form loaded")}catch(o){this.handleError(o)}finally{ui(this.dispatch,!1)}},async[kke]({state:t,rootGetters:e,rootState:r,dispatch:n},{docId:a}){try{if(!a)throw new Error("Missing parameter docId");ui(this.dispatch,!0);let o=Ql({rootState:this.state,rootGetters:e});await this.dispatch(Mz,{id:a});const i=this.getters["documents2/byId"](a);if(!i)throw new Error("Missing document");const{projectId:s}=i;if(await _x({id:null,rootState:r,state:t,rootGetters:e,dispatch:n,documentId:a,projectId:s}))return;o={...o,documentId:i.id,...s&&{projectId:s}},i.clients&&i.clients.length&&(o.ModuleEndCustomer=gx(ei(i.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"]))),this.commit(`forms/${Jl}`,{key:"document",formData:o})}catch(o){this.handleError(o)}finally{ui(this.dispatch,!1)}},async[wke]({state:t,rootState:e,dispatch:r,rootGetters:n},{id:a=null,projectId:o=null}={}){try{if(ui(this.dispatch,!0),await _x({id:a,rootState:e,state:t,rootGetters:n,dispatch:r,projectId:o}))return;let s={},u;if(a){if(await this.dispatch(Tz,{id:a}),u=this.getters["invoices/byId"](a),!u)throw Tt.event({type:"editInvoice",status:"failed",data:{id:a},error:"Tried to edit invoice that does not exist!"}),new Error(`Could not find invoice by id: '${a}'`);s={...s,...u.getProperties({scope:"invoice"})}}else if(s={...Ql({rootState:this.state,rootGetters:n})},o){s.projectId=o;const f=n["projects/byId"](o);f&&f.clients[0]&&(s.ModuleEndCustomer=gx(ei(f.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"])))}const{object:l,objectId:d}=s;this.commit(`forms/${Jl}`,{key:"document",formData:s}),Tt.event({type:a?"editInvoice":"newInvoice",status:"success",data:{id:a}}),Tt.debug("Invoice form loaded")}catch(i){Tt.event({type:a?"editInvoice":"newInvoice",status:"failed",data:{id:a},error:i})}finally{ui(this.dispatch,!1)}},async[Tke]({getters:t,commit:e},{next:r=null,doAttest:n=!1,doSell:a=!1}={}){let o=!1;try{let i=!1,s;const{invoice:u,hasChanged:l}=t,d=t.getInvoicePrices;let{id:f}=u;r==="invoice"&&(s={...u.getProperties(),ModuleArticles:u.articles,...d,id:0},this.dispatch(io,{data:[s],schema:"invoices"}),o=!0,this.$router.push({name:"invoice",params:{id:s.id,modal:!1}}));const m={...u.getProperties(),...d};return l("document")&&(f?await this.dispatch(dke,{id:f,body:m}):(i=!0,f=await this.dispatch(cke,{body:m}),e(_ke,{key:"document.id",value:f}))),o&&this.$router.replace({name:"invoice",params:{id:f,modal:!1}}),a?await this.dispatch(mke,{id:f}):n&&await this.dispatch(fke,{id:f}),await this.dispatch(vke,"document"),o||GV({next:r,invoiceId:f},this.$router),await this.dispatch(hke,{key:"document"}),o&&this.commit(`invoices/${bke}`,s.id),{id:f,isNew:i}}catch(i){return this.handleError(i),o&&this.$router.currentRoute.name!=="invoiceNew"&&this.$router.go(-1),null}},async[Pke]({state:t,rootGetters:e},{name:r=null}){if(!["100kr"].includes(r))throw Error("Missing valid param name");try{ui(this.dispatch,!0);let a={...Ql({rootState:this.state,rootGetters:e})};if(r==="100kr"){let o;const{data:i}=await epe("info@cling.se");i[0]?([o]=i,o.EndCustomerId=o.id):(await this.dispatch(Oe.FORM_NEW_ENDCUSTOMER),o=Object.assign(t.endCustomer,{name:"Cling Group AB",org_no:"559070-0273",email:"info@cling.se",customerType:"company",cellphone:"0850119885",street:"Kund-id WIN3890, FE nr 160",zip:"10569",city:"Stockholm"}),this.commit(Oe.SET_FORM_VALUE,{key:"endCustomer",value:o}),o.EndCustomerId=await this.dispatch(Oe.FORM_SUBMIT_ENDCUSTOMER,{showNotification:!1})),o.id=null,a={...Ql({rootState:this.state,rootGetters:e}),ModuleEndCustomer:{...o},ModuleArticles:[ime({name:"\u{1F4B0} Ge mig 100kr! \u{1F4B0}",price:1e4})]}}this.commit(`forms/${Jl}`,{key:"document",formData:a}),Tt.event({type:"campaignInvoice",status:"success",data:{name:r}}),Tt.debug("Invoice form loaded")}catch(a){Tt.event({type:"campaignInvoice",status:"failed",data:{name:r},error:a})}finally{ui(this.dispatch,!1)}},async[Mke]({rootGetters:t},{formData:e={}}={}){await this.dispatch(yke),t["application/company"],t["settings/allInvoiceSettings"];let r={};r={...r,...e,company:{...r.company,...e.company},contact:{...r.contact,...e.contact}},this.commit(`forms/${Jl}`,{key:"kycForm",formData:r})},async[Ske]({getters:t}){const{kycForm:e}=t||{};if(!e)throw Error("Kyc Form missing in store");return["ownersWithMoreThan25Percent","beneficialOwners"].forEach(n=>{e[n]=(e[n]||[]).map(a=>({...a,address:a.address||"Sverige",country:a.country||"Sverige"}))}),await fpe.post({form:e})}},{SET_FORM_VALUE:Eke,REMOVE_FORM_VALUE:Dke}=De.forms,Cke={async[Wn.SET_FORM_ARTICLE]({commit:t},{index:e=null,data:r}){let n="document.ModuleArticles";e!==null&&(n=`document.ModuleArticles[${e}]`);const a=Xi(r);return t(Eke,{key:n,value:a})},async[Wn.REMOVE_FORM_ARTICLE]({commit:t},e){return t(Dke,e)}},Zl=t=>typeof t=="object"&&t!==null&&t.toString()==={}.toString(),Pm=t=>JSON.parse(JSON.stringify(t)),bx=(t,e)=>{t=Pm(t);for(const r in e)e.hasOwnProperty(r)&&(Zl(t[r])&&Zl(e[r])?t[r]=bx(t[r],e[r]):t[r]=e[r]);return t},Sz=(t,e)=>{t=t.replace(/^#\/definitions\//,"").split("/");const r=(a,o)=>{const i=a.shift();if(o[i]){if(!a.length)return o[i]}else return{};return r(t,o[i])},n=r(t,e);return Zl(n)?Pm(n):n},$ke=(t,e)=>{const{length:r}=t;let n=-1,a={};for(;++n<r;){let o=t[n];o=typeof o.$ref<"u"?Sz(o.$ref,e):o,a=bx(a,o)}return a},Hs=(t,e)=>{if(typeof t.default<"u")return t.default;if(typeof t.allOf<"u"){const r=$ke(t.allOf,e);return Hs(r,e)}else if(typeof t.$ref<"u"){const r=Sz(t.$ref,e);return Hs(r,e)}else if(t.type==="object"){if(!t.properties)return{};for(const r in t.properties)t.properties.hasOwnProperty(r)&&(t.properties[r]=Hs(t.properties[r],e),(typeof t.properties[r]>"u"||Zl(t.properties[r])&&!Array.isArray(t.properties[r])&&!Object.keys(t.properties[r]).length)&&delete t.properties[r]);return t.properties}else if(t.type==="array"){if(!t.items)return[];const r=t.minItems||0;if(t.items.constructor===Array){const o=t.items.map(i=>Hs(i,e));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>r&&o.pop();return o}const n=Hs(t.items,e);if(typeof n>"u")return[];const a=[];for(let o=0;o<Math.max(1,r);o++)a.push(Pm(n));return a}},Ake=(t,e)=>(typeof e>"u"?e=t.definitions||{}:Zl(t.definitions)&&(e=bx(e,t.definitions)),Hs(Pm(t),e));class li{constructor(e){if(!e)throw new Error("Missing param data");const{validationSchema:r,views:n}=e;if(!r)throw new Error("Missing param validationSchema in template data");if(!n)throw new Error("Missing param views in template data");this._data=e}get data(){return this._data}get id(){return this.data.id||null}get companyId(){return this.data.companyId||null}get name(){return this.data.name||null}get isNew(){return!this.id}get validationSchema(){return this.data.validationSchema}get views(){return this.data.views||{}}get language(){return this.data.language}get theme(){return te(this,"_data.validationSchema.properties.data.properties.theme.default",{})||{}}get thumbnailUrl(){return this.data.thumbnailUrl}get defaultMedia(){if(this.thumbnailUrl)return{type:"image",resourceUrl:this.thumbnailUrl};const{defaultData:e}=this,r=(te(this,"_data.views.read.nodes")||[]).filter(a=>["header","coverBlock"].includes(a.itemType));let n=null;for(const a of r)if(a){if(n)break;let o=a.value[a.itemType];if(!o)continue;if(a.itemType==="header"){o+=".items";const i=(te(e,o)||[]).find(({type:s})=>s==="media");i&&i.media&&({media:n}=i)}else if(a.itemType==="coverBlock"){const{type:i,cover:s}=te(e,o)||{};s&&(n={...i&&{type:i},...s})}}if(!n){const a=te(this,"theme.background");a&&(n={type:"image",resourceUrl:a})}return n}get reminders(){const e=this.getDefaultData({path:"properties.data.properties.reminders"});return e&&Array.isArray(e)?e:[]}get defaultData(){return this.getDefaultData()}get categoryTags(){return te(this.defaultData,"tags",[]).reduce((e,r)=>[...e,r.name],[])}get type(){return this.categoryTags[0]}getDefaultData({path:e=""}={}){let r=this.validationSchema;return e&&(r=e.split(".").reduce((n,a)=>n[a],r)),Ake(r)||{}}}const Rke=Me.brand.charAt(0).toUpperCase()+Me.brand.slice(1),Ike={accept:"acceptera",address:"adress",and:"and",answerFeedback:{intermediate:{title:"Tack f\xF6r att du delar dina tankar."},no:{start:{action:"Skicka in",placeholder:"Vad b\xF6r vi f\xF6rb\xE4ttra?",text:"Finns det n\xE5got specifikt du \xF6nskar vi b\xF6r f\xF6rb\xE4ttra?",title:"Tack f\xF6r att du delar med dig av dina tankar."},success:{action:"L\xE4s mer om $t(appBrand)",secondary:"Tillbaka till dokumentet",text:"Din feedback togs emot helt perfekt. V\xE5rt team kommer att ta del av din feedback med stor lyh\xF6rdhet.",title:"Tack."}},start:{no:"Nej",title:"Tyckte du om att anv\xE4nda $t(appBrand) f\xF6r att visa det h\xE4r dokumentet?",yes:"Ja"},yes:{action:"S\xE4tt ig\xE5ng gratis",secondary:"L\xE4s mer om $t(appBrand)",text:"Skapa och skicka snygga dokument med $t(appBrand). Uppt\xE4ck alla f\xF6rdelar med att skicka webbaserade dokument med e-signering.",title:"B\xF6rja anv\xE4nda $t(appBrand) du med."}},answerModal:{answerSuccess:"Ditt svar togs emot helt perfekt.",bankId:{component:{defaultError:"N\xE5got gick fel. Se till att du har matat in r\xE4tt personnummer och f\xF6rs\xF6k igen.",signingInterrupted:"Signeringen avbr\xF6ts, f\xF6rs\xF6k igen...",validations:{socialNo:{personalNumber:"Personnumret \xE4r inte giltigt",required:"Skriv in ditt personnummer"}},viewText:{canceled:{text:"Signeringen avbr\xF6ts. Var god och f\xF6rs\xF6k igen.",title:"Signeringen avbr\xF6ts"},error:{text:"Ett fel intr\xE4ffa. Var god och f\xF6rs\xF6k igen.",title:"Ett fel intr\xE4ffa"},form:{text:"Skriv in ditt personnummer f\xF6r att p\xE5b\xF6rja signeringen.",title:"Signera dokumentet med BankID"},new:{spinnerText:"\xD6ppna BankID p\xE5 din enhet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"},signing:{spinnerText:"Var god signera dokumentet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signering p\xE5g\xE5r"},waiting:{spinnerText:"V\xE4ntar p\xE5 att du ska \xF6ppna BankID.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"}}},start:{action:"Signera med BankID",text:"Acceptera och signera dokumentet med BankID.",title:"Signera med BankID"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},decline:{component:{inputPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka."},start:{action:"Neka",text:"F\xF6r att neka dokumentet var god och bekr\xE4fta genom att klicka p\xE5 knappen nedanf\xF6r.",title:"Neka dokumentet"},success:{text:"Tack f\xF6r att du l\xE4mna ett svar.",title:"Du har nekat dokumentet."}},signature:{component:{draw:{canvasLabel:"Rita signatur",tab:"Rita"},subTitle:"Hur vill du signera?",terms:"Genom att signera dokumentet godk\xE4nner jag att den elektroniska signaturen \xE4r en representation av min handskrivna signatur och att den \xE4r lika giltig.",text:{canvasLabel:"F\xF6rhandsgranskning",nameLabel:"Signerad av",namePlaceholder:"Skriv ditt namn",tab:"Skriv"}},start:{action:"Signera & acceptera",text:"",title:"Acceptera dokumentet"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},versionError:{accept:{title:"Gick inte att signera dokumentet"},decline:{title:"Gick inte att neka dokumentet"},text:"Dokumentet har modifierats medan du har l\xE4st den. V\xE4nligen ladda om och ta del av det nya dokumentet f\xF6r att l\xE4mna svar.",btn:"Ladda om"},successText:"N\xE4r dokumentet har blivit signerat av alla parter kommer du f\xE5 en kopia skickat till din e-post {{email}} med en l\xE5st version av dokumentet.",successTextFallback:"N\xE4r dokumentet har blivit signerat av alla parter kommer du p\xE5 den h\xE4r webbsidan kunna ladda ner en l\xE5st version av dokumentet.",successTextFallbackSingle:"Dokumentet \xE4r nu signerat och komplett.",successTextSingle:"En bekr\xE4ftelse har skickats till e-posten {{email}} med en l\xE5st version av dokumentet.",successTitle:"Du har signerat dokumentet."},appBrand:Rke,approved:"godk\xE4nt",approx:"ca",cancel:"Avbryt",chapters:{answerButtons:{approveDescription:"Vi har meddelat {{- sender}} att dokumentet \xE4r godk\xE4nt.",approveTitle:"Dokumentet \xE4r godk\xE4nt!",denyDescription:"Vi har meddelat {{- sender}} att du inte \xE4r intresserad.",denyTitle:"Dokumentet \xE4r nekat",editPropDes:"Redigera fastighetsbeteckning",enterPropDes:"Ange fastighetsbeteckning",inPersonSignatureHint:"Du har blivit markerad f\xF6r att skriva under en fysisk kopia av detta dokument. Om du ist\xE4llet vill skriva under digitalt, kontakta",waitingDescription:"V\xE4ntar p\xE5 {{remaining}} st fler ska l\xE4mna svar.",youHave:"Du har "},articleItem:{eligibleForDeduction:"Ber\xE4ttigad f\xF6r {{type,deepNested:deduction}}-avdrag"},articleList:{changeShowVatTooltip:"\xC4ndra till att visa {{type}}",title:"Arbetsmoment / varor"},packageGroup:{errorCallout:"V\xE4lj minst ett alternativ",selectableOptions:"Valbara alternativ"},packageItem:{add:"L\xE4gg till paket",select:"V\xE4lj paket",selected:"Valt paket"},parties:{allRiskAndLiability:"Har allrisk- och ansvarsf\xF6rs\xE4kring",fTax:"Har F-skatt"},pricingSummary:{blocks:{approx:"Ungef\xE4rligt pris",deductionSubValue:"Totalpris utan avdrag {{price}}",maxPrice:"Maxpris",maxPriceVat:"Maxpris {{vat}}",net:"Netto",price:"Pris",rounding:"\xD6resavrundning",subTitleArticles:"Varav varor / moment med fast pris",summary:"Sammanst\xE4llning",total:"Total",typeDeduction:"Efter {{type,deepNested:deduction}}-avdrag"},placeholder:{description:"V\xE4lj vilket paket som passar dig b\xE4st genom att klicka p\xE5 ",descriptionBold:"V\xE4lj-knappen",title:"V\xE4lj ett paket"},terms:{houseWork:"Totalpriset efter skattereduktion f\xF6r {{type,deepNested:deduction}}-arbete f\xF6ruts\xE4tter att arbetet kvalificerar f\xF6r skattereduktion, att best\xE4llaren har det angivna utrymmet f\xF6r skattereduktion samt att det inte redan har utnyttjats f\xF6r annat {{type,deepNested:deduction}}-arbete. Best\xE4llaren ansvarar sj\xE4lv f\xF6r att kontrollera dess uppgifter.",houseWorkApprox:"Priset f\xF6r arbetet \xE4r ungef\xE4rligt. T\xE4nk p\xE5 att priset kan skilja sig med 15%. Om det g\xE4ller markarbeten rivningsarbeten eller lik. kan priset skilja sig med 25%. L\xE4s mer om detta i de allm\xE4nna best\xE4mmelserna.",reverseVat:"Notera att omv\xE4nd skattskyldighet g\xE4ller."}},termsDisclaimer:{description:"Genom att godk\xE4nna dokumentet accepterar du de ",termsAndConditions:"allm\xE4nna villkoren",title:"Villkor"}},close:"St\xE4ng",company:"f\xF6retag",deduction:Ml.deduction,denied:"nekat",deny:"Neka",denyModal:{denyButton:"Neka dokument",helpfulInformation:"Vi meddelar {{- senderName}} p\xE5 {{- senderCompany}} att du har valt att neka dokumentet.",otherPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka dokumentet.",subTitle:"Bekr\xE4fta ditt svar genom att klicka p\xE5 Neka.",successTitle:"Du har nekat dokumentet",thanksAnswer:"Tack f\xF6r ditt svar!",title:"Neka dokument"},detail_plural:"detaljer",document:"Dokument",document_plural:"Dokument",documentDetails:{subTitle:"Information om dokumentet."},documentTemplateView:{emailTemplate:{expires:{content:"$t(documentTemplateView.reminder) $t(documentTemplateView.emailTemplate.first.content)",subject:"$t(documentTemplateView.reminder) $t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.expires.title) $t(documentTemplateView.emailTemplate.expires.subject). $t(documentTemplateView.readMoreAndReply)
350
350
 
351
351
  {{docLink}}`,title:"$t(documentTemplateView.emailTemplate.first.title)"},first:{content:"Du har f\xE5tt ett dokument fr\xE5n {{company.name}}. Klicka p\xE5 knappen f\xF6r att l\xE4sa mer och l\xE4mna ett svar.",subject:"$t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.first.title) $t(documentTemplateView.emailTemplate.first.subject). $t(documentTemplateView.readMoreAndReply)
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "@cling-se/widget",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
+ "main": "./dist/main.umd.js",
6
+ "module": "./dist/main.es.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/main.es.js",
10
+ "require": "./dist/main.umd.js"
11
+ }
12
+ },
5
13
  "publishConfig": {
6
14
  "access": "public",
7
15
  "registry": "https://registry.npmjs.org/"
package/dist/index.es.js DELETED
@@ -1,4 +0,0 @@
1
- import { G as f } from "./main.ee1119c9.js";
2
- export {
3
- f as default
4
- };