@vergelijkdirect/comparison-forms 1.3.16 → 1.3.17-ver-8380.1

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 (68) hide show
  1. package/dist-rollup/AddressHandler-jwYRDHTI.js +288 -0
  2. package/dist-rollup/BikeForm-30I53uCm.js +126 -0
  3. package/dist-rollup/BikeFormHorizontal-u1PW-9KV.js +126 -0
  4. package/dist-rollup/BirthdateInput-1tsGzxTx.js +84 -0
  5. package/dist-rollup/BusinessCarForm-oeBpet3X.js +119 -0
  6. package/dist-rollup/BusinessCarFormHorizontal-lBxuzRso.js +119 -0
  7. package/dist-rollup/CarForm-xTslX4mq.js +102 -0
  8. package/dist-rollup/CarFormHorizontal-z_-Ew9Ji.js +101 -0
  9. package/dist-rollup/CaravanForm-BWUCqXZ8.js +137 -0
  10. package/dist-rollup/CaravanFormHorizontal-qVPTYW4D.js +137 -0
  11. package/dist-rollup/CaravanFormOld-JaY01RDW.js +130 -0
  12. package/dist-rollup/DefaultForm-4umbLheg.js +60 -0
  13. package/dist-rollup/DefaultInput-zxU1ufPA.js +435 -0
  14. package/dist-rollup/DefaultPlainRadioGroup-i8P1ACl4.js +145 -0
  15. package/dist-rollup/DefaultSelect-t64f_R7v.js +93 -0
  16. package/dist-rollup/ErrorHandler-9Zxi6g3R.js +45 -0
  17. package/dist-rollup/FamilyCompositionInput-dWbnEFac.js +51 -0
  18. package/dist-rollup/HouseForm-ga4I0nPa.js +105 -0
  19. package/dist-rollup/HouseFormHorizontal-zcNNDuDQ.js +104 -0
  20. package/dist-rollup/LegalAssistanceForm-M2yX72hT.js +109 -0
  21. package/dist-rollup/LegalAssistanceFormHorizontal-NztH_5Yq.js +108 -0
  22. package/dist-rollup/LiabilityForm-D09YaRGm.js +102 -0
  23. package/dist-rollup/LiabilityFormHorizontal-nV1JerpT.js +102 -0
  24. package/dist-rollup/LicensePlate-BMeYEcIe.js +505 -0
  25. package/dist-rollup/Loader-_esX79Uz.js +1105 -0
  26. package/dist-rollup/ManualNewValueModal-S0C68NGl.js +2586 -0
  27. package/dist-rollup/MopedForm-ZL3526H3.js +112 -0
  28. package/dist-rollup/MopedFormHorizontal-6btf9cMz.js +112 -0
  29. package/dist-rollup/MotorForm-M6FHM1pV.js +111 -0
  30. package/dist-rollup/MotorFormHorizontal-NcCjW3P5.js +105 -0
  31. package/dist-rollup/PackageForm-HcPVbqOI.js +305 -0
  32. package/dist-rollup/PetForm-OvLvibk1.js +115 -0
  33. package/dist-rollup/PetFormHorizontal-u7P_iNbx.js +124 -0
  34. package/dist-rollup/PetFormOld-9yiD9akJ.js +126 -0
  35. package/dist-rollup/PhoneInput-l6YwvwSj.js +131 -0
  36. package/dist-rollup/QuestionnaireForm-mDU7NBoo.js +64 -0
  37. package/dist-rollup/QuotationForm-j1i5zScM.js +183 -0
  38. package/dist-rollup/RiskScannerForm-JGojbshZ.js +152 -0
  39. package/dist-rollup/SearchableSelect-1GCKHHKe.js +232 -0
  40. package/dist-rollup/Session.util-aedjr12J.js +42 -0
  41. package/dist-rollup/SimpleCard-_Mg9wAqJ.js +50 -0
  42. package/dist-rollup/TravelForm-goy4CZNN.js +117 -0
  43. package/dist-rollup/TravelFormHorizontal-q396jXWh.js +117 -0
  44. package/dist-rollup/TravelFormOld-83YKTgP8.js +123 -0
  45. package/dist-rollup/ZipcodeInput-z5W6JSl0.js +61 -0
  46. package/dist-rollup/_commonjsHelpers-4t9S7M5p.js +30 -0
  47. package/dist-rollup/array.util-agNtEyks.js +16 -0
  48. package/dist-rollup/bikeBrands.model-FYepHp3k.js +338 -0
  49. package/dist-rollup/businessCar-Mt6F5U-j.js +188 -0
  50. package/dist-rollup/car-oIzIKvsB.js +85 -0
  51. package/dist-rollup/common-J_DOueuE.js +1577 -0
  52. package/dist-rollup/comparison-forms.js +6 -30268
  53. package/dist-rollup/comparison-forms.umd.cjs +15 -29
  54. package/dist-rollup/createLoanComparisonForm-T4s_32PC.js +96 -0
  55. package/dist-rollup/familyComposition.model-1F80igwZ.js +21 -0
  56. package/dist-rollup/familySize.model-9dESnIuL.js +98 -0
  57. package/dist-rollup/form-radio-group-J-EQJhh9.js +1238 -0
  58. package/dist-rollup/house-iRMRIU6o.js +73 -0
  59. package/dist-rollup/index-WjnHra7k.js +619 -0
  60. package/dist-rollup/liability-W6z2ze1t.js +73 -0
  61. package/dist-rollup/loanPurpose-nICjCm1d.js +273 -0
  62. package/dist-rollup/moped-T6_xyOsb.js +84 -0
  63. package/dist-rollup/motor-fCU2n3O5.js +83 -0
  64. package/dist-rollup/paymentTerms.model-J3WNhgPU.js +145 -0
  65. package/dist-rollup/updateLoanComparisonForm-iyTnJD5A.js +92 -0
  66. package/dist-rollup/useSkipUpdateComparison-WseHt-cH.js +437 -0
  67. package/dist-rollup/vue-popper.min-O3ciEEKg.js +1159 -0
  68. package/package.json +7 -4
@@ -0,0 +1,1105 @@
1
+ var y = (i, e, s) => new Promise((t, l) => {
2
+ var r = (h) => {
3
+ try {
4
+ c(s.next(h));
5
+ } catch (d) {
6
+ l(d);
7
+ }
8
+ }, u = (h) => {
9
+ try {
10
+ c(s.throw(h));
11
+ } catch (d) {
12
+ l(d);
13
+ }
14
+ }, c = (h) => h.done ? t(h.value) : Promise.resolve(h.value).then(r, u);
15
+ c((s = s.apply(i, e)).next());
16
+ });
17
+ import { defineComponent as C, reactive as z, ref as f, computed as I, watch as U, onMounted as J } from "vue";
18
+ import { n as O, i as g, j as V } from "./index-WjnHra7k.js";
19
+ import { E as Q } from "./ErrorHandler-9Zxi6g3R.js";
20
+ function w(i) {
21
+ return i === 0 ? !1 : Array.isArray(i) && i.length === 0 ? !0 : !i;
22
+ }
23
+ function Z(i) {
24
+ return (...e) => !i(...e);
25
+ }
26
+ function q(i, e) {
27
+ return i === void 0 && (i = "undefined"), i === null && (i = "null"), i === !1 && (i = "false"), i.toString().toLowerCase().indexOf(e.trim()) !== -1;
28
+ }
29
+ function B(i, e, s, t) {
30
+ return i.filter((l) => q(t(l, s), e));
31
+ }
32
+ function W(i) {
33
+ return i.filter((e) => !e.$isLabel);
34
+ }
35
+ function k(i, e) {
36
+ return (s) => s.reduce((t, l) => l[i] && l[i].length ? (t.push({
37
+ $groupLabel: l[e],
38
+ $isLabel: !0
39
+ }), t.concat(l[i])) : t, []);
40
+ }
41
+ function X(i, e, s, t, l) {
42
+ return (r) => r.map((u) => {
43
+ if (!u[s])
44
+ return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."), [];
45
+ const c = B(u[s], i, e, l);
46
+ return c.length ? {
47
+ [t]: u[t],
48
+ [s]: c
49
+ } : [];
50
+ });
51
+ }
52
+ const D = (...i) => (e) => i.reduce((s, t) => t(s), e), Y = {
53
+ data() {
54
+ return {
55
+ search: "",
56
+ isOpen: !1,
57
+ preferredOpenDirection: "below",
58
+ optimizedHeight: this.maxHeight
59
+ };
60
+ },
61
+ props: {
62
+ /**
63
+ * Decide whether to filter the results based on search query.
64
+ * Useful for async filtering, where we search through more complex data.
65
+ * @type {Boolean}
66
+ */
67
+ internalSearch: {
68
+ type: Boolean,
69
+ default: !0
70
+ },
71
+ /**
72
+ * Array of available options: Objects, Strings or Integers.
73
+ * If array of objects, visible label will default to option.label.
74
+ * If `labal` prop is passed, label will equal option['label']
75
+ * @type {Array}
76
+ */
77
+ options: {
78
+ type: Array,
79
+ required: !0
80
+ },
81
+ /**
82
+ * Equivalent to the `multiple` attribute on a `<select>` input.
83
+ * @default false
84
+ * @type {Boolean}
85
+ */
86
+ multiple: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ /**
91
+ * Presets the selected options value.
92
+ * @type {Object||Array||String||Integer}
93
+ */
94
+ value: {
95
+ type: null,
96
+ default() {
97
+ return [];
98
+ }
99
+ },
100
+ /**
101
+ * Key to compare objects
102
+ * @default 'id'
103
+ * @type {String}
104
+ */
105
+ trackBy: {
106
+ type: String
107
+ },
108
+ /**
109
+ * Label to look for in option Object
110
+ * @default 'label'
111
+ * @type {String}
112
+ */
113
+ label: {
114
+ type: String
115
+ },
116
+ /**
117
+ * Enable/disable search in options
118
+ * @default true
119
+ * @type {Boolean}
120
+ */
121
+ searchable: {
122
+ type: Boolean,
123
+ default: !0
124
+ },
125
+ /**
126
+ * Clear the search input after `)
127
+ * @default true
128
+ * @type {Boolean}
129
+ */
130
+ clearOnSelect: {
131
+ type: Boolean,
132
+ default: !0
133
+ },
134
+ /**
135
+ * Hide already selected options
136
+ * @default false
137
+ * @type {Boolean}
138
+ */
139
+ hideSelected: {
140
+ type: Boolean,
141
+ default: !1
142
+ },
143
+ /**
144
+ * Equivalent to the `placeholder` attribute on a `<select>` input.
145
+ * @default 'Select option'
146
+ * @type {String}
147
+ */
148
+ placeholder: {
149
+ type: String,
150
+ default: "Select option"
151
+ },
152
+ /**
153
+ * Allow to remove all selected values
154
+ * @default true
155
+ * @type {Boolean}
156
+ */
157
+ allowEmpty: {
158
+ type: Boolean,
159
+ default: !0
160
+ },
161
+ /**
162
+ * Reset this.internalValue, this.search after this.internalValue changes.
163
+ * Useful if want to create a stateless dropdown.
164
+ * @default false
165
+ * @type {Boolean}
166
+ */
167
+ resetAfter: {
168
+ type: Boolean,
169
+ default: !1
170
+ },
171
+ /**
172
+ * Enable/disable closing after selecting an option
173
+ * @default true
174
+ * @type {Boolean}
175
+ */
176
+ closeOnSelect: {
177
+ type: Boolean,
178
+ default: !0
179
+ },
180
+ /**
181
+ * Function to interpolate the custom label
182
+ * @default false
183
+ * @type {Function}
184
+ */
185
+ customLabel: {
186
+ type: Function,
187
+ default(i, e) {
188
+ return w(i) ? "" : e ? i[e] : i;
189
+ }
190
+ },
191
+ /**
192
+ * Disable / Enable tagging
193
+ * @default false
194
+ * @type {Boolean}
195
+ */
196
+ taggable: {
197
+ type: Boolean,
198
+ default: !1
199
+ },
200
+ /**
201
+ * String to show when highlighting a potential tag
202
+ * @default 'Press enter to create a tag'
203
+ * @type {String}
204
+ */
205
+ tagPlaceholder: {
206
+ type: String,
207
+ default: "Press enter to create a tag"
208
+ },
209
+ /**
210
+ * By default new tags will appear above the search results.
211
+ * Changing to 'bottom' will revert this behaviour
212
+ * and will proritize the search results
213
+ * @default 'top'
214
+ * @type {String}
215
+ */
216
+ tagPosition: {
217
+ type: String,
218
+ default: "top"
219
+ },
220
+ /**
221
+ * Number of allowed selected options. No limit if 0.
222
+ * @default 0
223
+ * @type {Number}
224
+ */
225
+ max: {
226
+ type: [Number, Boolean],
227
+ default: !1
228
+ },
229
+ /**
230
+ * Will be passed with all events as second param.
231
+ * Useful for identifying events origin.
232
+ * @default null
233
+ * @type {String|Integer}
234
+ */
235
+ id: {
236
+ default: null
237
+ },
238
+ /**
239
+ * Limits the options displayed in the dropdown
240
+ * to the first X options.
241
+ * @default 1000
242
+ * @type {Integer}
243
+ */
244
+ optionsLimit: {
245
+ type: Number,
246
+ default: 1e3
247
+ },
248
+ /**
249
+ * Name of the property containing
250
+ * the group values
251
+ * @default 1000
252
+ * @type {String}
253
+ */
254
+ groupValues: {
255
+ type: String
256
+ },
257
+ /**
258
+ * Name of the property containing
259
+ * the group label
260
+ * @default 1000
261
+ * @type {String}
262
+ */
263
+ groupLabel: {
264
+ type: String
265
+ },
266
+ /**
267
+ * Allow to select all group values
268
+ * by selecting the group label
269
+ * @default false
270
+ * @type {Boolean}
271
+ */
272
+ groupSelect: {
273
+ type: Boolean,
274
+ default: !1
275
+ },
276
+ /**
277
+ * Array of keyboard keys to block
278
+ * when selecting
279
+ * @default 1000
280
+ * @type {String}
281
+ */
282
+ blockKeys: {
283
+ type: Array,
284
+ default() {
285
+ return [];
286
+ }
287
+ },
288
+ /**
289
+ * Prevent from wiping up the search value
290
+ * @default false
291
+ * @type {Boolean}
292
+ */
293
+ preserveSearch: {
294
+ type: Boolean,
295
+ default: !1
296
+ },
297
+ /**
298
+ * Select 1st options if value is empty
299
+ * @default false
300
+ * @type {Boolean}
301
+ */
302
+ preselectFirst: {
303
+ type: Boolean,
304
+ default: !1
305
+ },
306
+ /**
307
+ * Prevent autofocus
308
+ * @default false
309
+ * @type {Boolean}
310
+ */
311
+ preventAutofocus: {
312
+ type: Boolean,
313
+ default: !1
314
+ }
315
+ },
316
+ mounted() {
317
+ !this.multiple && this.max && console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."), this.preselectFirst && !this.internalValue.length && this.options.length && this.select(this.filteredOptions[0]);
318
+ },
319
+ computed: {
320
+ internalValue() {
321
+ return this.value || this.value === 0 ? Array.isArray(this.value) ? this.value : [this.value] : [];
322
+ },
323
+ filteredOptions() {
324
+ const i = this.search || "", e = i.toLowerCase().trim();
325
+ let s = this.options.concat();
326
+ return this.internalSearch ? s = this.groupValues ? this.filterAndFlat(s, e, this.label) : B(s, e, this.label, this.customLabel) : s = this.groupValues ? k(this.groupValues, this.groupLabel)(s) : s, s = this.hideSelected ? s.filter(Z(this.isSelected)) : s, this.taggable && e.length && !this.isExistingOption(e) && (this.tagPosition === "bottom" ? s.push({ isTag: !0, label: i }) : s.unshift({ isTag: !0, label: i })), s.slice(0, this.optionsLimit);
327
+ },
328
+ valueKeys() {
329
+ return this.trackBy ? this.internalValue.map((i) => i[this.trackBy]) : this.internalValue;
330
+ },
331
+ optionKeys() {
332
+ return (this.groupValues ? this.flatAndStrip(this.options) : this.options).map((e) => this.customLabel(e, this.label).toString().toLowerCase());
333
+ },
334
+ currentOptionLabel() {
335
+ return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
336
+ }
337
+ },
338
+ watch: {
339
+ internalValue() {
340
+ this.resetAfter && this.internalValue.length && (this.search = "", this.$emit("input", this.multiple ? [] : null));
341
+ },
342
+ search() {
343
+ this.$emit("search-change", this.search, this.id);
344
+ }
345
+ },
346
+ methods: {
347
+ /**
348
+ * Returns the internalValue in a way it can be emited to the parent
349
+ * @returns {Object||Array||String||Integer}
350
+ */
351
+ getValue() {
352
+ return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
353
+ },
354
+ /**
355
+ * Filters and then flattens the options list
356
+ * @param {Array}
357
+ * @returns {Array} returns a filtered and flat options list
358
+ */
359
+ filterAndFlat(i, e, s) {
360
+ return D(
361
+ X(e, s, this.groupValues, this.groupLabel, this.customLabel),
362
+ k(this.groupValues, this.groupLabel)
363
+ )(i);
364
+ },
365
+ /**
366
+ * Flattens and then strips the group labels from the options list
367
+ * @param {Array}
368
+ * @returns {Array} returns a flat options list without group labels
369
+ */
370
+ flatAndStrip(i) {
371
+ return D(
372
+ k(this.groupValues, this.groupLabel),
373
+ W
374
+ )(i);
375
+ },
376
+ /**
377
+ * Updates the search value
378
+ * @param {String}
379
+ */
380
+ updateSearch(i) {
381
+ this.search = i;
382
+ },
383
+ /**
384
+ * Finds out if the given query is already present
385
+ * in the available options
386
+ * @param {String}
387
+ * @returns {Boolean} returns true if element is available
388
+ */
389
+ isExistingOption(i) {
390
+ return this.options ? this.optionKeys.indexOf(i) > -1 : !1;
391
+ },
392
+ /**
393
+ * Finds out if the given element is already present
394
+ * in the result value
395
+ * @param {Object||String||Integer} option passed element to check
396
+ * @returns {Boolean} returns true if element is selected
397
+ */
398
+ isSelected(i) {
399
+ const e = this.trackBy ? i[this.trackBy] : i;
400
+ return this.valueKeys.indexOf(e) > -1;
401
+ },
402
+ /**
403
+ * Finds out if the given option is disabled
404
+ * @param {Object||String||Integer} option passed element to check
405
+ * @returns {Boolean} returns true if element is disabled
406
+ */
407
+ isOptionDisabled(i) {
408
+ return !!i.$isDisabled;
409
+ },
410
+ /**
411
+ * Returns empty string when options is null/undefined
412
+ * Returns tag query if option is tag.
413
+ * Returns the customLabel() results and casts it to string.
414
+ *
415
+ * @param {Object||String||Integer} Passed option
416
+ * @returns {Object||String}
417
+ */
418
+ getOptionLabel(i) {
419
+ if (w(i))
420
+ return "";
421
+ if (i.isTag)
422
+ return i.label;
423
+ if (i.$isLabel)
424
+ return i.$groupLabel;
425
+ let e = this.customLabel(i, this.label);
426
+ return w(e) ? "" : e;
427
+ },
428
+ /**
429
+ * Add the given option to the list of selected options
430
+ * or sets the option as the selected option.
431
+ * If option is already selected -> remove it from the results.
432
+ *
433
+ * @param {Object||String||Integer} option to select/deselect
434
+ * @param {Boolean} block removing
435
+ */
436
+ select(i, e) {
437
+ if (i.$isLabel && this.groupSelect) {
438
+ this.selectGroup(i);
439
+ return;
440
+ }
441
+ if (!(this.blockKeys.indexOf(e) !== -1 || this.disabled || i.$isDisabled || i.$isLabel) && !(this.max && this.multiple && this.internalValue.length === this.max) && !(e === "Tab" && !this.pointerDirty)) {
442
+ if (i.isTag)
443
+ this.$emit("tag", i.label, this.id), this.search = "", this.closeOnSelect && !this.multiple && this.deactivate();
444
+ else {
445
+ if (this.isSelected(i)) {
446
+ e !== "Tab" && this.removeElement(i);
447
+ return;
448
+ }
449
+ this.multiple ? this.$emit("input", this.internalValue.concat([i]), this.id) : this.$emit("input", i, this.id), this.$emit("select", i, this.id), this.clearOnSelect && (this.search = "");
450
+ }
451
+ this.closeOnSelect && this.deactivate();
452
+ }
453
+ },
454
+ /**
455
+ * Add the given group options to the list of selected options
456
+ * If all group optiona are already selected -> remove it from the results.
457
+ *
458
+ * @param {Object||String||Integer} group to select/deselect
459
+ */
460
+ selectGroup(i) {
461
+ const e = this.options.find((s) => s[this.groupLabel] === i.$groupLabel);
462
+ if (e) {
463
+ if (this.wholeGroupSelected(e)) {
464
+ this.$emit("remove", e[this.groupValues], this.id);
465
+ const s = this.trackBy ? e[this.groupValues].map((l) => l[this.trackBy]) : e[this.groupValues], t = this.internalValue.filter(
466
+ (l) => s.indexOf(this.trackBy ? l[this.trackBy] : l) === -1
467
+ );
468
+ this.$emit("input", t, this.id);
469
+ } else {
470
+ let s = e[this.groupValues].filter(
471
+ (t) => !(this.isOptionDisabled(t) || this.isSelected(t))
472
+ );
473
+ this.max && s.splice(this.max - this.internalValue.length), this.$emit("select", s, this.id), this.$emit(
474
+ "input",
475
+ this.internalValue.concat(s),
476
+ this.id
477
+ );
478
+ }
479
+ this.closeOnSelect && this.deactivate();
480
+ }
481
+ },
482
+ /**
483
+ * Helper to identify if all values in a group are selected
484
+ *
485
+ * @param {Object} group to validated selected values against
486
+ */
487
+ wholeGroupSelected(i) {
488
+ return i[this.groupValues].every(
489
+ (e) => this.isSelected(e) || this.isOptionDisabled(e)
490
+ );
491
+ },
492
+ /**
493
+ * Helper to identify if all values in a group are disabled
494
+ *
495
+ * @param {Object} group to check for disabled values
496
+ */
497
+ wholeGroupDisabled(i) {
498
+ return i[this.groupValues].every(this.isOptionDisabled);
499
+ },
500
+ /**
501
+ * Removes the given option from the selected options.
502
+ * Additionally checks this.allowEmpty prop if option can be removed when
503
+ * it is the last selected option.
504
+ *
505
+ * @param {type} option description
506
+ * @returns {type} description
507
+ */
508
+ removeElement(i, e = !0) {
509
+ if (this.disabled || i.$isDisabled)
510
+ return;
511
+ if (!this.allowEmpty && this.internalValue.length <= 1) {
512
+ this.deactivate();
513
+ return;
514
+ }
515
+ const s = typeof i == "object" ? this.valueKeys.indexOf(i[this.trackBy]) : this.valueKeys.indexOf(i);
516
+ if (this.multiple) {
517
+ const t = this.internalValue.slice(0, s).concat(this.internalValue.slice(s + 1));
518
+ this.$emit("input", t, this.id);
519
+ } else
520
+ this.$emit("input", null, this.id);
521
+ this.$emit("remove", i, this.id), this.closeOnSelect && e && this.deactivate();
522
+ },
523
+ /**
524
+ * Calls this.removeElement() with the last element
525
+ * from this.internalValue (selected element Array)
526
+ *
527
+ * @fires this#removeElement
528
+ */
529
+ removeLastElement() {
530
+ this.blockKeys.indexOf("Delete") === -1 && this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length && this.removeElement(this.internalValue[this.internalValue.length - 1], !1);
531
+ },
532
+ /**
533
+ * Opens the multiselect’s dropdown.
534
+ * Sets this.isOpen to TRUE
535
+ */
536
+ activate() {
537
+ this.isOpen || this.disabled || (this.adjustPosition(), this.groupValues && this.pointer === 0 && this.filteredOptions.length && (this.pointer = 1), this.isOpen = !0, this.searchable ? (this.preserveSearch || (this.search = ""), this.preventAutofocus || this.$nextTick(() => this.$refs.search && this.$refs.search.focus())) : this.preventAutofocus || typeof this.$el != "undefined" && this.$el.focus(), this.$emit("open", this.id));
538
+ },
539
+ /**
540
+ * Closes the multiselect’s dropdown.
541
+ * Sets this.isOpen to FALSE
542
+ */
543
+ deactivate() {
544
+ this.isOpen && (this.isOpen = !1, this.searchable ? this.$refs.search !== null && typeof this.$refs.search != "undefined" && this.$refs.search.blur() : typeof this.$el != "undefined" && this.$el.blur(), this.preserveSearch || (this.search = ""), this.$emit("close", this.getValue(), this.id));
545
+ },
546
+ /**
547
+ * Call this.activate() or this.deactivate()
548
+ * depending on this.isOpen value.
549
+ *
550
+ * @fires this#activate || this#deactivate
551
+ * @property {Boolean} isOpen indicates if dropdown is open
552
+ */
553
+ toggle() {
554
+ this.isOpen ? this.deactivate() : this.activate();
555
+ },
556
+ /**
557
+ * Updates the hasEnoughSpace variable used for
558
+ * detecting where to expand the dropdown
559
+ */
560
+ adjustPosition() {
561
+ if (typeof window == "undefined")
562
+ return;
563
+ const i = this.$el.getBoundingClientRect().top, e = window.innerHeight - this.$el.getBoundingClientRect().bottom;
564
+ e > this.maxHeight || e > i || this.openDirection === "below" || this.openDirection === "bottom" ? (this.preferredOpenDirection = "below", this.optimizedHeight = Math.min(e - 40, this.maxHeight)) : (this.preferredOpenDirection = "above", this.optimizedHeight = Math.min(i - 40, this.maxHeight));
565
+ }
566
+ }
567
+ }, ee = {
568
+ data() {
569
+ return {
570
+ pointer: 0,
571
+ pointerDirty: !1
572
+ };
573
+ },
574
+ props: {
575
+ /**
576
+ * Enable/disable highlighting of the pointed value.
577
+ * @type {Boolean}
578
+ * @default true
579
+ */
580
+ showPointer: {
581
+ type: Boolean,
582
+ default: !0
583
+ },
584
+ optionHeight: {
585
+ type: Number,
586
+ default: 40
587
+ }
588
+ },
589
+ computed: {
590
+ pointerPosition() {
591
+ return this.pointer * this.optionHeight;
592
+ },
593
+ visibleElements() {
594
+ return this.optimizedHeight / this.optionHeight;
595
+ }
596
+ },
597
+ watch: {
598
+ filteredOptions() {
599
+ this.pointerAdjust();
600
+ },
601
+ isOpen() {
602
+ this.pointerDirty = !1;
603
+ },
604
+ pointer() {
605
+ this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
606
+ }
607
+ },
608
+ methods: {
609
+ optionHighlight(i, e) {
610
+ return {
611
+ "vd-multiselect__option--highlight": i === this.pointer && this.showPointer,
612
+ "vd-multiselect__option--selected": this.isSelected(e)
613
+ };
614
+ },
615
+ groupHighlight(i, e) {
616
+ if (!this.groupSelect)
617
+ return [
618
+ "vd-multiselect__option--disabled",
619
+ { "vd-multiselect__option--group": e.$isLabel }
620
+ ];
621
+ const s = this.options.find((t) => t[this.groupLabel] === e.$groupLabel);
622
+ return s && !this.wholeGroupDisabled(s) ? [
623
+ "vd-multiselect__option--group",
624
+ { "vd-multiselect__option--highlight": i === this.pointer && this.showPointer },
625
+ { "vd-multiselect__option--group-selected": this.wholeGroupSelected(s) }
626
+ ] : "vd-multiselect__option--disabled";
627
+ },
628
+ addPointerElement({ key: i } = "Enter") {
629
+ this.filteredOptions.length > 0 && this.select(this.filteredOptions[this.pointer], i), this.pointerReset();
630
+ },
631
+ pointerForward() {
632
+ this.pointer < this.filteredOptions.length - 1 && (this.pointer++, this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight && (this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward()), this.pointerDirty = !0;
633
+ },
634
+ pointerBackward() {
635
+ this.pointer > 0 ? (this.pointer--, this.$refs.list.scrollTop >= this.pointerPosition && (this.$refs.list.scrollTop = this.pointerPosition), this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerBackward()) : this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect && this.pointerForward(), this.pointerDirty = !0;
636
+ },
637
+ pointerReset() {
638
+ this.closeOnSelect && (this.pointer = 0, this.$refs.list && (this.$refs.list.scrollTop = 0));
639
+ },
640
+ pointerAdjust() {
641
+ this.pointer >= this.filteredOptions.length - 1 && (this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0), this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect && this.pointerForward();
642
+ },
643
+ pointerSet(i) {
644
+ this.pointer = i, this.pointerDirty = !0;
645
+ }
646
+ }
647
+ }, te = {
648
+ name: "vue-multiselect",
649
+ mixins: [Y, ee],
650
+ props: {
651
+ /**
652
+ * name attribute to match optional label element
653
+ * @default ''
654
+ * @type {String}
655
+ */
656
+ name: {
657
+ type: String,
658
+ default: ""
659
+ },
660
+ /**
661
+ * String to show when pointing to an option
662
+ * @default 'Press enter to select'
663
+ * @type {String}
664
+ */
665
+ selectLabel: {
666
+ type: String,
667
+ default: "Press enter to select"
668
+ },
669
+ /**
670
+ * String to show when pointing to an option
671
+ * @default 'Press enter to select'
672
+ * @type {String}
673
+ */
674
+ selectGroupLabel: {
675
+ type: String,
676
+ default: "Press enter to select group"
677
+ },
678
+ /**
679
+ * String to show next to selected option
680
+ * @default 'Selected'
681
+ * @type {String}
682
+ */
683
+ selectedLabel: {
684
+ type: String,
685
+ default: "Selected"
686
+ },
687
+ /**
688
+ * String to show when pointing to an already selected option
689
+ * @default 'Press enter to remove'
690
+ * @type {String}
691
+ */
692
+ deselectLabel: {
693
+ type: String,
694
+ default: "Press enter to remove"
695
+ },
696
+ /**
697
+ * String to show when pointing to an already selected option
698
+ * @default 'Press enter to remove'
699
+ * @type {String}
700
+ */
701
+ deselectGroupLabel: {
702
+ type: String,
703
+ default: "Press enter to deselect group"
704
+ },
705
+ /**
706
+ * Decide whether to show pointer labels
707
+ * @default true
708
+ * @type {Boolean}
709
+ */
710
+ showLabels: {
711
+ type: Boolean,
712
+ default: !0
713
+ },
714
+ /**
715
+ * Limit the display of selected options. The rest will be hidden within the limitText string.
716
+ * @default 99999
717
+ * @type {Integer}
718
+ */
719
+ limit: {
720
+ type: Number,
721
+ default: 99999
722
+ },
723
+ /**
724
+ * Sets maxHeight style value of the dropdown
725
+ * @default 300
726
+ * @type {Integer}
727
+ */
728
+ maxHeight: {
729
+ type: Number,
730
+ default: 300
731
+ },
732
+ /**
733
+ * Function that process the message shown when selected
734
+ * elements pass the defined limit.
735
+ * @default 'and * more'
736
+ * @param {Int} count Number of elements more than limit
737
+ * @type {Function}
738
+ */
739
+ limitText: {
740
+ type: Function,
741
+ default: (i) => `and ${i} more`
742
+ },
743
+ /**
744
+ * Set true to trigger the loading spinner.
745
+ * @default False
746
+ * @type {Boolean}
747
+ */
748
+ loading: {
749
+ type: Boolean,
750
+ default: !1
751
+ },
752
+ /**
753
+ * Disables the multiselect if true.
754
+ * @default false
755
+ * @type {Boolean}
756
+ */
757
+ disabled: {
758
+ type: Boolean,
759
+ default: !1
760
+ },
761
+ /**
762
+ * Fixed opening direction
763
+ * @default ''
764
+ * @type {String}
765
+ */
766
+ openDirection: {
767
+ type: String,
768
+ default: ""
769
+ },
770
+ /**
771
+ * Shows slot with message about empty options
772
+ * @default true
773
+ * @type {Boolean}
774
+ */
775
+ showNoOptions: {
776
+ type: Boolean,
777
+ default: !0
778
+ },
779
+ showNoResults: {
780
+ type: Boolean,
781
+ default: !0
782
+ },
783
+ tabindex: {
784
+ type: Number,
785
+ default: 0
786
+ }
787
+ },
788
+ computed: {
789
+ currentLabel() {
790
+ return this.selectedLabel ? this.selectedLabel : this.currentOptionLabel;
791
+ },
792
+ hasOptionGroup() {
793
+ return this.groupValues && this.groupLabel && this.groupSelect;
794
+ },
795
+ isSingleLabelVisible() {
796
+ return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
797
+ },
798
+ isPlaceholderVisible() {
799
+ return !this.internalValue.length && (!this.searchable || !this.isOpen) && !this.search;
800
+ },
801
+ visibleValues() {
802
+ return this.multiple ? this.internalValue.slice(0, this.limit) : [];
803
+ },
804
+ singleValue() {
805
+ return this.internalValue[0];
806
+ },
807
+ deselectLabelText() {
808
+ return this.showLabels ? this.deselectLabel : "";
809
+ },
810
+ deselectGroupLabelText() {
811
+ return this.showLabels ? this.deselectGroupLabel : "";
812
+ },
813
+ selectLabelText() {
814
+ return this.showLabels ? this.selectLabel : "";
815
+ },
816
+ selectGroupLabelText() {
817
+ return this.showLabels ? this.selectGroupLabel : "";
818
+ },
819
+ selectedLabelText() {
820
+ return this.showLabels ? this.selectedLabel : "";
821
+ },
822
+ inputStyle() {
823
+ return this.searchable || this.multiple && this.value && this.value.length ? this.search ? (this.internalValue.length && this.removeElement(this.internalValue[this.internalValue.length - 1], !1), "") : this.isOpen ? { width: "100%" } : { width: "0", position: "absolute" } : "";
824
+ },
825
+ contentStyle() {
826
+ return this.options.length ? { display: "inline-block" } : { display: "block" };
827
+ },
828
+ isAbove() {
829
+ return this.openDirection === "above" || this.openDirection === "top" ? !0 : this.openDirection === "below" || this.openDirection === "bottom" ? !1 : this.preferredOpenDirection === "above";
830
+ },
831
+ showSearchInput() {
832
+ return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : !0);
833
+ }
834
+ }
835
+ };
836
+ var E = function() {
837
+ var e = this, s = e._self._c;
838
+ return s("div", { staticClass: "vd-multiselect", class: { "vd-multiselect--active": e.isOpen, "vd-multiselect--disabled": e.disabled, "vd-multiselect--above": e.isAbove, "vd-multiselect--has-options-group": e.hasOptionGroup }, attrs: { tabindex: e.searchable ? -1 : e.tabindex, role: "combobox", "aria-owns": "listbox-" + e.id }, on: { focus: function(t) {
839
+ return e.activate();
840
+ }, blur: function(t) {
841
+ e.searchable || e.deactivate();
842
+ }, keydown: [function(t) {
843
+ return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) || t.target !== t.currentTarget ? null : (t.preventDefault(), e.pointerForward());
844
+ }, function(t) {
845
+ return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) || t.target !== t.currentTarget ? null : (t.preventDefault(), e.pointerBackward());
846
+ }], keypress: function(t) {
847
+ return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") && e._k(t.keyCode, "tab", 9, t.key, "Tab") || (t.stopPropagation(), t.target !== t.currentTarget) ? null : e.addPointerElement(t);
848
+ }, keyup: function(t) {
849
+ return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : e.deactivate();
850
+ } } }, [e._t("caret", function() {
851
+ return [s("div", { staticClass: "vd-multiselect__select", on: { mousedown: function(t) {
852
+ return t.preventDefault(), t.stopPropagation(), e.toggle();
853
+ } } })];
854
+ }, { toggle: e.toggle }), e._t("clear", null, { search: e.search }), s("div", { ref: "tags", staticClass: "vd-multiselect__tags" }, [e._t("selection", function() {
855
+ return [s("div", { directives: [{ name: "show", rawName: "v-show", value: e.visibleValues.length > 0, expression: "visibleValues.length > 0" }], staticClass: "vd-multiselect__tags-wrap" }, [e._l(e.visibleValues, function(t, l) {
856
+ return [e._t("tag", function() {
857
+ return [s("span", { key: l, staticClass: "vd-multiselect__tag" }, [s("span", { domProps: { textContent: e._s(e.getOptionLabel(t)) } }), s("i", { staticClass: "vd-multiselect__tag-icon", attrs: { tabindex: "1" }, on: { keypress: function(r) {
858
+ return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.preventDefault(), e.removeElement(t));
859
+ }, mousedown: function(r) {
860
+ return r.preventDefault(), e.removeElement(t);
861
+ } } })])];
862
+ }, { option: t, search: e.search, remove: e.removeElement })];
863
+ })], 2), e.internalValue && e.internalValue.length > e.limit ? [e._t("limit", function() {
864
+ return [s("strong", { staticClass: "vd-multiselect__strong", domProps: { textContent: e._s(e.limitText(e.internalValue.length - e.limit)) } })];
865
+ })] : e._e()];
866
+ }, { search: e.search, remove: e.removeElement, values: e.visibleValues, isOpen: e.isOpen }), s("transition", { attrs: { name: "vd-multiselect__loading" } }, [e._t("loading", function() {
867
+ return [s("div", { directives: [{ name: "show", rawName: "v-show", value: e.loading, expression: "loading" }], staticClass: "vd-multiselect__spinner" })];
868
+ })], 2), e.searchable ? s("input", { ref: "search", staticClass: "vd-multiselect__input", style: e.inputStyle, attrs: { name: e.name, id: e.id, type: "text", autocomplete: "off", spellcheck: "false", placeholder: e.placeholder, disabled: e.disabled, tabindex: e.tabindex, "aria-controls": "listbox-" + e.id }, domProps: { value: e.search }, on: { input: function(t) {
869
+ return e.updateSearch(t.target.value);
870
+ }, focus: function(t) {
871
+ return t.preventDefault(), e.activate();
872
+ }, blur: function(t) {
873
+ return t.preventDefault(), e.deactivate();
874
+ }, keyup: function(t) {
875
+ return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : e.deactivate();
876
+ }, keydown: [function(t) {
877
+ return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : (t.preventDefault(), e.pointerForward());
878
+ }, function(t) {
879
+ return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) ? null : (t.preventDefault(), e.pointerBackward());
880
+ }, function(t) {
881
+ return !t.type.indexOf("key") && e._k(t.keyCode, "delete", [8, 46], t.key, ["Backspace", "Delete", "Del"]) ? null : (t.stopPropagation(), e.removeLastElement());
882
+ }], keypress: function(t) {
883
+ return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") || (t.preventDefault(), t.stopPropagation(), t.target !== t.currentTarget) ? null : e.addPointerElement(t);
884
+ } } }) : e._e(), e.isSingleLabelVisible ? s("span", { staticClass: "vd-multiselect__single", on: { mousedown: function(t) {
885
+ return t.preventDefault(), e.toggle.apply(null, arguments);
886
+ } } }, [e._t("singleLabel", function() {
887
+ return [e._v(" " + e._s(e.currentLabel) + " ")];
888
+ }, { option: e.singleValue })], 2) : e._e(), e.isPlaceholderVisible ? s("span", { staticClass: "vd-multiselect__placeholder", on: { mousedown: function(t) {
889
+ return t.preventDefault(), e.toggle.apply(null, arguments);
890
+ } } }, [e._t("placeholder", function() {
891
+ return [e._v(" " + e._s(e.placeholder) + " ")];
892
+ })], 2) : e._e()], 2), s("transition", { attrs: { name: "multiselect" } }, [s("div", { directives: [{ name: "show", rawName: "v-show", value: e.isOpen && !e.loading, expression: "isOpen && !loading" }], staticClass: "vd-multiselect__tab-wrapper", style: {
893
+ borderColor: e.filteredOptions.length !== 0 || e.options.length !== 0 || e.showNoResults && e.filteredOptions.length === 0 && e.search && !e.loading || e.showNoOptions && (e.options.length === 0 || e.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !e.loading ? "" : "transparent"
894
+ } }, [s("div", { ref: "list", staticClass: "vd-multiselect__content-wrapper", attrs: { tabindex: "-1" }, on: { focus: e.activate, mousedown: function(t) {
895
+ t.preventDefault();
896
+ } } }, [s("ul", { staticClass: "vd-multiselect__content", style: e.contentStyle, attrs: { role: "listbox", id: "listbox-" + e.id } }, [e._t("beforeList"), e.multiple && e.max === e.internalValue.length ? s("li", [s("span", { staticClass: "vd-multiselect__option" }, [e._t("maxElements", function() {
897
+ return [e._v("Maximum of " + e._s(e.max) + " options selected. First remove a selected option to select another.")];
898
+ })], 2)]) : e._e(), !e.max || e.internalValue.length < e.max ? e._l(e.filteredOptions, function(t, l) {
899
+ return s("li", { key: l, staticClass: "vd-multiselect__element", attrs: { id: e.id + "-" + l, role: t && (t.$isLabel || t.$isDisabled) ? null : "option" } }, [t && (t.$isLabel || t.$isDisabled) ? e._e() : s("span", { staticClass: "vd-multiselect__option", class: e.optionHighlight(l, t), attrs: { "data-select": t && t.isTag ? e.tagPlaceholder : e.selectLabelText, "data-selected": e.selectedLabelText, "data-deselect": e.deselectLabelText }, on: { click: function(r) {
900
+ return r.stopPropagation(), e.select(t);
901
+ }, mouseenter: function(r) {
902
+ return r.target !== r.currentTarget ? null : e.pointerSet(l);
903
+ } } }, [e._t("option", function() {
904
+ return [s("span", [e._v(e._s(e.getOptionLabel(t)))])];
905
+ }, { option: t, search: e.search, index: l })], 2), t && (t.$isLabel || t.$isDisabled) ? s("span", { staticClass: "vd-multiselect__option", class: e.groupHighlight(l, t), attrs: { "data-select": e.groupSelect && e.selectGroupLabelText, "data-deselect": e.groupSelect && e.deselectGroupLabelText }, on: { mouseenter: function(r) {
906
+ if (r.target !== r.currentTarget)
907
+ return null;
908
+ e.groupSelect && e.pointerSet(l);
909
+ }, mousedown: function(r) {
910
+ return r.preventDefault(), e.selectGroup(t);
911
+ } } }, [e._t("option", function() {
912
+ return [s("span", [e._v(e._s(e.getOptionLabel(t)))])];
913
+ }, { option: t, search: e.search, index: l })], 2) : e._e()]);
914
+ }) : e._e(), s("li", { directives: [{ name: "show", rawName: "v-show", value: e.showNoResults && e.filteredOptions.length === 0 && e.search && !e.loading, expression: "showNoResults && (filteredOptions.length === 0 && search && !loading)" }] }, [s("span", { staticClass: "vd-multiselect__option" }, [e._t("noResult", function() {
915
+ return [e._v("No elements found. Consider changing the search query.")];
916
+ }, { search: e.search })], 2)]), s("li", { directives: [{ name: "show", rawName: "v-show", value: e.showNoOptions && (e.options.length === 0 || e.hasOptionGroup === !0 && e.filteredOptions.length === 0) && !e.search && !e.loading, expression: "showNoOptions && ((options.length === 0 || (hasOptionGroup === true && filteredOptions.length === 0)) && !search && !loading)" }] }, [s("span", { staticClass: "vd-multiselect__option" }, [e._t("noOptions", function() {
917
+ return [e._v("List is empty.")];
918
+ })], 2)]), e._t("afterList")], 2)])])])], 2);
919
+ }, ie = [];
920
+ E._withStripped = !0;
921
+ var N = /* @__PURE__ */ O(
922
+ te,
923
+ E,
924
+ ie,
925
+ !1,
926
+ null,
927
+ null,
928
+ null,
929
+ null
930
+ );
931
+ N.options.__file = "/Users/vergelijkdirect/Documents/projects/comparison-forms/src/components/common/extended/Multiselect.vue";
932
+ const se = N.exports, le = C({
933
+ name: "CompaniesListSelect",
934
+ components: {
935
+ ErrorHandler: Q,
936
+ Multiselect: se
937
+ },
938
+ props: {
939
+ hasCompaniesListValidationError: {
940
+ required: !1,
941
+ type: Boolean
942
+ },
943
+ companyData: {
944
+ required: !1,
945
+ type: Object,
946
+ default: () => {
947
+ }
948
+ }
949
+ },
950
+ setup(i, { attrs: e, listeners: s, emit: t }) {
951
+ var x;
952
+ let l = z({
953
+ kvk_number: "",
954
+ company_name: "",
955
+ legal_entity: "",
956
+ rsin: "",
957
+ branch_number: "",
958
+ postcode: "",
959
+ city: "",
960
+ street: "",
961
+ house_number: "",
962
+ house_number_addition: "",
963
+ full_address: "",
964
+ sbi_activities: ""
965
+ }), r = f((x = i.companyData) != null && x.kvkNummer ? i.companyData : null), u = f([]), c = f(!1), h = f(null), d = f(!1), b = f(!1), L = f(!1);
966
+ const j = I(
967
+ () => !d.value && !b.value && i.hasCompaniesListValidationError
968
+ ), H = () => {
969
+ Object.keys(l).map((n) => {
970
+ l[n] = "";
971
+ });
972
+ }, G = () => {
973
+ H(), t("update-company-data", l), d.value = !1;
974
+ }, _ = () => {
975
+ d.value = !0;
976
+ }, K = () => {
977
+ L.value = !1, b.value = !0;
978
+ }, F = () => {
979
+ b.value = !1;
980
+ };
981
+ U(r, (n) => y(this, null, function* () {
982
+ n && n.kvkNummer && (g.value = !0, yield V.dataService.getProfileInfo(n.kvkNummer).then((a) => {
983
+ _();
984
+ let o = a._embedded.hoofdvestiging.adressen.find((m) => m.type === "bezoekadres"), p = o.huisletter || o.toevoegingAdres || "";
985
+ p += o.huisnummerToevoeging || "", l.kvk_number = a.kvkNummer, l.company_name = a.naam, l.legal_entity = a._embedded.eigenaar.rechtsvorm, l.rsin = a._embedded.eigenaar.rsin || null, l.branch_number = a._embedded.hoofdvestiging.vestigingsnummer, l.postcode = o.postcode || null, l.city = o.plaats || null, l.street = o.straatnaam || null, l.house_number = o.huisnummer || null, l.house_number_addition = p || null, l.full_address = o.volledigAdres || null, l.sbi_activities = a.sbiActiviteiten.map((m) => ({
986
+ code: m.sbiCode,
987
+ description: m.sbiOmschrijving,
988
+ is_main: m.indHoofdactiviteit === "Ja"
989
+ })), t("update-company-data", a);
990
+ }).catch((a) => {
991
+ console.error("Error itcClient data service on getProfileInfo", a);
992
+ }).finally(() => {
993
+ g.value = !1;
994
+ }));
995
+ }));
996
+ const v = (n) => {
997
+ g.value = !0, c.value = !0, n.aantal = 30, V.dataService.searchBusinessInfoV2({ companyName: n.naam, kvkNumber: n.kvkNummer }, 1, n.aantal).then((a) => {
998
+ c.value = !1;
999
+ let o = a.resultaten;
1000
+ o.length > 0 ? u.value = o.filter((p) => p.type === "hoofdvestiging" || p.type === "nevenvestiging").map((p) => (p.name = `${p.naam}`, p)) : u.value = [];
1001
+ }).catch((a) => {
1002
+ u.value = [], c.value = !1;
1003
+ }).finally(() => {
1004
+ g.value = !1;
1005
+ });
1006
+ }, M = (n) => {
1007
+ !n.length && u.value.length && (u.value = []), n.length > 2 && (clearTimeout(h.value), h.value = setTimeout(() => {
1008
+ n.length == 8 && /^\d+$/.test(n) ? v({ kvkNummer: n }) : S(n) ? v(S(n)) : v({ naam: n });
1009
+ }, 700));
1010
+ }, S = (n) => {
1011
+ if (n.length > 7) {
1012
+ let a = n.split(" ");
1013
+ if (a.length > 1 && /^([0-9]{4}[A-Z]{2}|[0-9]{4}[a-z]{2})$/.test(a[0])) {
1014
+ let o = {
1015
+ postcode: a[0],
1016
+ huisnummer: a[1]
1017
+ };
1018
+ return a[2] && (o.huisnummerToevoeging = a[2]), o;
1019
+ }
1020
+ }
1021
+ return null;
1022
+ }, R = () => i.companyData ? i.companyData.naam : "";
1023
+ return J(() => y(this, null, function* () {
1024
+ var n;
1025
+ (n = i.companyData) != null && n.kvkNummer && (l.kvk_number = i.companyData.kvkNummer, l.full_address = `${i.companyData.streetName} ${i.companyData.houseNumber} ${i.companyData.zipCode} ${i.companyData.city}`, _());
1026
+ })), {
1027
+ isRequestIsHandling: g,
1028
+ companyName: r,
1029
+ companies: u,
1030
+ businessInfoModel: l,
1031
+ isOptionSelected: d,
1032
+ isDropdownFocused: b,
1033
+ isErrorShowed: L,
1034
+ isLoading: c,
1035
+ attrs: e,
1036
+ listeners: s,
1037
+ findCompanies: M,
1038
+ selectOption: _,
1039
+ removeOption: G,
1040
+ setDropdownOpened: K,
1041
+ setDropdownClosed: F,
1042
+ selectedLabel: R,
1043
+ hasValidationError: j
1044
+ };
1045
+ }
1046
+ });
1047
+ var A = function() {
1048
+ var e = this, s = e._self._c;
1049
+ return e._self._setupProxy, s("div", [s("multiselect", { class: {
1050
+ "vd-multiselect__chosen-option": e.isOptionSelected && !e.isDropdownFocused,
1051
+ "vd-multiselect--error": e.hasValidationError
1052
+ }, attrs: { options: e.companies, label: "name", "track-by": "name", multiple: !1, "options-limit": 30, placeholder: "Typ je bedrijfsnaam of KvK-nummer", "select-label": "Select", "preserve-search": !0, loading: e.isLoading, "internal-search": !1, deselectLabel: "", "selected-label": e.selectedLabel(), hideSelected: !0, openDirection: "bottom", showNoOptions: !1 }, on: { "search-change": e.findCompanies, remove: e.removeOption, open: e.setDropdownOpened, close: e.setDropdownClosed }, scopedSlots: e._u([{ key: "option", fn: function({ option: t }) {
1053
+ return [s("div", { staticClass: "vd-multiselect__option-external-wrapper" }, [s("div", { staticClass: "vd-multiselect__option-wrapper" }, [s("p", [s("b", [e._v(e._s(t.naam))]), s("br")]), s("p", [e._v(e._s("Kvk: " + t.kvkNummer)), s("br")]), s("p", [e._v(e._s(t.adres.binnenlandsAdres.plaats + ", " + t.adres.binnenlandsAdres.straatnaam)), s("br")])])])];
1054
+ } }]), model: { value: e.companyName, callback: function(t) {
1055
+ e.companyName = t;
1056
+ }, expression: "companyName" } }, [s("template", { slot: "noResult" }, [s("p", { staticClass: "vd-multiselect__option-non-result mb-0" }, [e._v("Helaas, we hebben geen resultaten gevonden. Probeer te zoeken op de naam waarmee je bedrijf is geregistreerd bij de Kamer van Koophandel, of gebruik je KvK-nummer.")])]), s("template", { slot: "noOptions" }, [s("p", { staticClass: "vd-multiselect__option-non-result mb-0" }, [e._v("Bedrijfsnaam of KVK-nummer")])])], 2), e.isOptionSelected && !e.isDropdownFocused ? s("div", { staticClass: "vd-multiselect__address-info mt-1" }, [s("i", { staticClass: "fas fa-info-circle vd-tip-icon vd-tip-icon_additional-text" }), s("span", [e._v("Kvk: " + e._s(e.businessInfoModel.kvk_number) + " " + e._s(e.businessInfoModel.full_address))])]) : e._e(), s("error-handler", { attrs: { "errors-data": [{ rule: e.hasValidationError, text: "Bedrijfsnaam of KVK-nummer is verplicht" }] } })], 1);
1057
+ }, ne = [];
1058
+ A._withStripped = !0;
1059
+ var P = /* @__PURE__ */ O(
1060
+ le,
1061
+ A,
1062
+ ne,
1063
+ !1,
1064
+ null,
1065
+ null,
1066
+ null,
1067
+ null
1068
+ );
1069
+ P.options.__file = "/Users/vergelijkdirect/Documents/projects/comparison-forms/src/components/common/inputs/CompaniesListSelect.vue";
1070
+ const pe = P.exports, re = C({
1071
+ name: "Loader",
1072
+ props: {
1073
+ isActive: {
1074
+ type: Boolean,
1075
+ required: !1,
1076
+ default: !0
1077
+ },
1078
+ small: {
1079
+ type: Boolean,
1080
+ required: !1,
1081
+ default: !1
1082
+ }
1083
+ }
1084
+ });
1085
+ var T = function() {
1086
+ var e = this, s = e._self._c;
1087
+ return e._self._setupProxy, e.isActive ? s("div", { staticClass: "loader-container", class: { "loader-container--small": e.small } }, [s("div", { staticClass: "loader", class: { "loader--small": e.small } })]) : e._e();
1088
+ }, ae = [];
1089
+ T._withStripped = !0;
1090
+ var $ = /* @__PURE__ */ O(
1091
+ re,
1092
+ T,
1093
+ ae,
1094
+ !1,
1095
+ null,
1096
+ "3514e0e8",
1097
+ null,
1098
+ null
1099
+ );
1100
+ $.options.__file = "/Users/vergelijkdirect/Documents/projects/comparison-forms/src/components/common/Loader.vue";
1101
+ const de = $.exports;
1102
+ export {
1103
+ pe as C,
1104
+ de as L
1105
+ };