@sbcore/ng-absolute-validator 14.0.0

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 (171) hide show
  1. package/README.md +257 -0
  2. package/esm2020/i18n/bn.mjs +68 -0
  3. package/esm2020/i18n/de.mjs +68 -0
  4. package/esm2020/i18n/en.mjs +68 -0
  5. package/esm2020/i18n/es.mjs +68 -0
  6. package/esm2020/i18n/fr.mjs +68 -0
  7. package/esm2020/i18n/hi.mjs +68 -0
  8. package/esm2020/i18n/ja.mjs +68 -0
  9. package/esm2020/i18n/pt.mjs +68 -0
  10. package/esm2020/i18n/ru.mjs +68 -0
  11. package/esm2020/i18n/zh.mjs +68 -0
  12. package/esm2020/lib/common.utils.mjs +49 -0
  13. package/esm2020/lib/config-interface.mjs +3 -0
  14. package/esm2020/lib/constant.mjs +87 -0
  15. package/esm2020/lib/directive/error-trigger/error-trigger-on.directive.mjs +35 -0
  16. package/esm2020/lib/directive/index.mjs +3 -0
  17. package/esm2020/lib/directive/native-element/native-element.directive.mjs +34 -0
  18. package/esm2020/lib/interface.mjs +14 -0
  19. package/esm2020/lib/ng-absolute-validator.component.mjs +194 -0
  20. package/esm2020/lib/ng-absolute-validator.module.mjs +125 -0
  21. package/esm2020/lib/ng-absolute-validator.service.mjs +67 -0
  22. package/esm2020/lib/rule/above/above.directive.mjs +45 -0
  23. package/esm2020/lib/rule/accepted/accepted.directive.mjs +44 -0
  24. package/esm2020/lib/rule/after/after.directive.mjs +46 -0
  25. package/esm2020/lib/rule/alpha/alpha.directive.mjs +41 -0
  26. package/esm2020/lib/rule/alpha_dash/alpha-dash.directive.mjs +41 -0
  27. package/esm2020/lib/rule/alpha_numeric/alpha-numeric.directive.mjs +41 -0
  28. package/esm2020/lib/rule/array/array.directive.mjs +41 -0
  29. package/esm2020/lib/rule/before/before.directive.mjs +46 -0
  30. package/esm2020/lib/rule/between/between.directive.mjs +46 -0
  31. package/esm2020/lib/rule/boolean/boolean.directive.mjs +41 -0
  32. package/esm2020/lib/rule/confirmed/confirmed.directive.mjs +64 -0
  33. package/esm2020/lib/rule/credit_card/credit-card.directive.mjs +43 -0
  34. package/esm2020/lib/rule/cvv/cvv.directive.mjs +41 -0
  35. package/esm2020/lib/rule/date/date.directive.mjs +46 -0
  36. package/esm2020/lib/rule/date_format/date-format.directive.mjs +46 -0
  37. package/esm2020/lib/rule/debit_card/debit-card.directive.mjs +43 -0
  38. package/esm2020/lib/rule/different/different.directive.mjs +63 -0
  39. package/esm2020/lib/rule/dimension/dimension.directive.mjs +49 -0
  40. package/esm2020/lib/rule/email/email.directive.mjs +41 -0
  41. package/esm2020/lib/rule/ends_with/ends-with.directive.mjs +45 -0
  42. package/esm2020/lib/rule/equals/equals.directive.mjs +45 -0
  43. package/esm2020/lib/rule/exists/exists.directive.mjs +49 -0
  44. package/esm2020/lib/rule/image/image.directive.mjs +41 -0
  45. package/esm2020/lib/rule/in/in.directive.mjs +45 -0
  46. package/esm2020/lib/rule/includes/includes.directive.mjs +45 -0
  47. package/esm2020/lib/rule/index.mjs +60 -0
  48. package/esm2020/lib/rule/integer/integer.directive.mjs +41 -0
  49. package/esm2020/lib/rule/ip/ip.directive.mjs +41 -0
  50. package/esm2020/lib/rule/ipv4/ipv4.directive.mjs +41 -0
  51. package/esm2020/lib/rule/ipv6/ipv6.directive.mjs +41 -0
  52. package/esm2020/lib/rule/json/json.directive.mjs +41 -0
  53. package/esm2020/lib/rule/max/max.directive.mjs +51 -0
  54. package/esm2020/lib/rule/mimes/mimes.directive.mjs +47 -0
  55. package/esm2020/lib/rule/min/min.directive.mjs +51 -0
  56. package/esm2020/lib/rule/not_equals/not-equals.directive.mjs +44 -0
  57. package/esm2020/lib/rule/not_in/not-in.directive.mjs +45 -0
  58. package/esm2020/lib/rule/not_regex/not-regex.directive.mjs +45 -0
  59. package/esm2020/lib/rule/number/number.directive.mjs +41 -0
  60. package/esm2020/lib/rule/phone_no/phone-no.directive.mjs +45 -0
  61. package/esm2020/lib/rule/range/range.directive.mjs +46 -0
  62. package/esm2020/lib/rule/regex/regex.directive.mjs +45 -0
  63. package/esm2020/lib/rule/required/required.directive.mjs +41 -0
  64. package/esm2020/lib/rule/required_if/required-if.directive.mjs +66 -0
  65. package/esm2020/lib/rule/required_unless/required-unless.directive.mjs +65 -0
  66. package/esm2020/lib/rule/required_with/required-with.directive.mjs +67 -0
  67. package/esm2020/lib/rule/required_with_all/required-with-all.directive.mjs +67 -0
  68. package/esm2020/lib/rule/required_without/required-without.directive.mjs +67 -0
  69. package/esm2020/lib/rule/required_without_all/required-without-all.directive.mjs +67 -0
  70. package/esm2020/lib/rule/rule.directive.mjs +35 -0
  71. package/esm2020/lib/rule/rule.module.mjs +141 -0
  72. package/esm2020/lib/rule/same/same.directive.mjs +62 -0
  73. package/esm2020/lib/rule/size/size.directive.mjs +44 -0
  74. package/esm2020/lib/rule/starts_with/starts-with.directive.mjs +45 -0
  75. package/esm2020/lib/rule/strength/strength.directive.mjs +47 -0
  76. package/esm2020/lib/rule/string/string.directive.mjs +41 -0
  77. package/esm2020/lib/rule/under/under.directive.mjs +44 -0
  78. package/esm2020/lib/rule/unique/unique.directive.mjs +48 -0
  79. package/esm2020/lib/rule/url/url.directive.mjs +41 -0
  80. package/esm2020/lib/rule/uuid/uuid.directive.mjs +41 -0
  81. package/esm2020/lib/rule/video/video.directive.mjs +41 -0
  82. package/esm2020/lib/services/http.request.service.mjs +20 -0
  83. package/esm2020/lib/services/messages-builder.service.mjs +46 -0
  84. package/esm2020/lib/services/reactive.validate.mjs +69 -0
  85. package/esm2020/lib/services/utils.service.mjs +476 -0
  86. package/esm2020/lib/services/validate-rule.service.mjs +103 -0
  87. package/esm2020/lib/transator.loader.mjs +38 -0
  88. package/esm2020/public-api.mjs +11 -0
  89. package/esm2020/sbcore-ng-absolute-validator.mjs +5 -0
  90. package/fesm2015/sbcore-ng-absolute-validator.mjs +4488 -0
  91. package/fesm2015/sbcore-ng-absolute-validator.mjs.map +1 -0
  92. package/fesm2020/sbcore-ng-absolute-validator.mjs +4480 -0
  93. package/fesm2020/sbcore-ng-absolute-validator.mjs.map +1 -0
  94. package/i18n/bn.d.ts +68 -0
  95. package/i18n/de.d.ts +68 -0
  96. package/i18n/en.d.ts +68 -0
  97. package/i18n/es.d.ts +68 -0
  98. package/i18n/fr.d.ts +68 -0
  99. package/i18n/hi.d.ts +68 -0
  100. package/i18n/ja.d.ts +68 -0
  101. package/i18n/pt.d.ts +68 -0
  102. package/i18n/ru.d.ts +68 -0
  103. package/i18n/zh.d.ts +68 -0
  104. package/index.d.ts +5 -0
  105. package/lib/directive/error-trigger/error-trigger-on.directive.d.ts +10 -0
  106. package/lib/directive/index.d.ts +2 -0
  107. package/lib/directive/native-element/native-element.directive.d.ts +12 -0
  108. package/lib/ng-absolute-validator.module.d.ts +20 -0
  109. package/lib/rule/above/above.directive.d.ts +20 -0
  110. package/lib/rule/accepted/accepted.directive.d.ts +20 -0
  111. package/lib/rule/after/after.directive.d.ts +20 -0
  112. package/lib/rule/alpha/alpha.directive.d.ts +19 -0
  113. package/lib/rule/alpha_dash/alpha-dash.directive.d.ts +19 -0
  114. package/lib/rule/alpha_numeric/alpha-numeric.directive.d.ts +19 -0
  115. package/lib/rule/array/array.directive.d.ts +19 -0
  116. package/lib/rule/before/before.directive.d.ts +20 -0
  117. package/lib/rule/between/between.directive.d.ts +20 -0
  118. package/lib/rule/boolean/boolean.directive.d.ts +19 -0
  119. package/lib/rule/confirmed/confirmed.directive.d.ts +24 -0
  120. package/lib/rule/credit_card/credit-card.directive.d.ts +19 -0
  121. package/lib/rule/cvv/cvv.directive.d.ts +19 -0
  122. package/lib/rule/date/date.directive.d.ts +20 -0
  123. package/lib/rule/date_format/date-format.directive.d.ts +20 -0
  124. package/lib/rule/debit_card/debit-card.directive.d.ts +19 -0
  125. package/lib/rule/different/different.directive.d.ts +24 -0
  126. package/lib/rule/dimension/dimension.directive.d.ts +21 -0
  127. package/lib/rule/email/email.directive.d.ts +19 -0
  128. package/lib/rule/ends_with/ends-with.directive.d.ts +20 -0
  129. package/lib/rule/equals/equals.directive.d.ts +20 -0
  130. package/lib/rule/exists/exists.directive.d.ts +21 -0
  131. package/lib/rule/image/image.directive.d.ts +19 -0
  132. package/lib/rule/in/in.directive.d.ts +20 -0
  133. package/lib/rule/includes/includes.directive.d.ts +20 -0
  134. package/lib/rule/index.d.ts +59 -0
  135. package/lib/rule/integer/integer.directive.d.ts +19 -0
  136. package/lib/rule/ip/ip.directive.d.ts +19 -0
  137. package/lib/rule/ipv4/ipv4.directive.d.ts +19 -0
  138. package/lib/rule/ipv6/ipv6.directive.d.ts +19 -0
  139. package/lib/rule/json/json.directive.d.ts +19 -0
  140. package/lib/rule/max/max.directive.d.ts +20 -0
  141. package/lib/rule/mimes/mimes.directive.d.ts +20 -0
  142. package/lib/rule/min/min.directive.d.ts +20 -0
  143. package/lib/rule/not_equals/not-equals.directive.d.ts +20 -0
  144. package/lib/rule/not_in/not-in.directive.d.ts +20 -0
  145. package/lib/rule/not_regex/not-regex.directive.d.ts +20 -0
  146. package/lib/rule/number/number.directive.d.ts +19 -0
  147. package/lib/rule/phone_no/phone-no.directive.d.ts +20 -0
  148. package/lib/rule/range/range.directive.d.ts +20 -0
  149. package/lib/rule/regex/regex.directive.d.ts +20 -0
  150. package/lib/rule/required/required.directive.d.ts +19 -0
  151. package/lib/rule/required_if/required-if.directive.d.ts +24 -0
  152. package/lib/rule/required_unless/required-unless.directive.d.ts +24 -0
  153. package/lib/rule/required_with/required-with.directive.d.ts +24 -0
  154. package/lib/rule/required_with_all/required-with-all.directive.d.ts +24 -0
  155. package/lib/rule/required_without/required-without.directive.d.ts +24 -0
  156. package/lib/rule/required_without_all/required-without-all.directive.d.ts +24 -0
  157. package/lib/rule/rule.module.d.ts +65 -0
  158. package/lib/rule/same/same.directive.d.ts +24 -0
  159. package/lib/rule/size/size.directive.d.ts +20 -0
  160. package/lib/rule/starts_with/starts-with.directive.d.ts +20 -0
  161. package/lib/rule/strength/strength.directive.d.ts +20 -0
  162. package/lib/rule/string/string.directive.d.ts +19 -0
  163. package/lib/rule/under/under.directive.d.ts +20 -0
  164. package/lib/rule/unique/unique.directive.d.ts +21 -0
  165. package/lib/rule/url/url.directive.d.ts +19 -0
  166. package/lib/rule/uuid/uuid.directive.d.ts +19 -0
  167. package/lib/rule/video/video.directive.d.ts +19 -0
  168. package/lib/services/reactive.validate.d.ts +21 -0
  169. package/lib/transator.loader.d.ts +10 -0
  170. package/package.json +66 -0
  171. package/public-api.d.ts +7 -0
@@ -0,0 +1,4480 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, Inject, EventEmitter, Component, Optional, Input, Output, ContentChild, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
3
+ import { Subject, debounceTime, takeUntil, of, from, distinctUntilChanged, switchMap, first, map as map$1, firstValueFrom } from 'rxjs';
4
+ import * as i1$2 from '@angular/forms';
5
+ import { FormGroupDirective, NgForm, NG_VALIDATORS, NG_ASYNC_VALIDATORS } from '@angular/forms';
6
+ import * as i1 from '@ngx-translate/core';
7
+ import { TranslateModule, TranslateService, TranslateLoader } from '@ngx-translate/core';
8
+ import * as i3 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import { map, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, first as first$1 } from 'rxjs/operators';
11
+ import { isValid, parse, isAfter, isBefore } from 'date-fns';
12
+ import * as i1$1 from '@angular/common/http';
13
+ import { HttpClientModule } from '@angular/common/http';
14
+
15
+ const LIB_CONFIG = new InjectionToken('LIB_CONFIG');
16
+
17
+ const GlobalConstant = {
18
+ customObjectName: 'ng_abs',
19
+ customRulesName: 'validators',
20
+ customElementName: 'nativeElement',
21
+ customFieldName: 'field_name',
22
+ approvedLanguage: [
23
+ 'en', 'ar'
24
+ ],
25
+ fileDependentRules: [
26
+ 'image', 'video', 'mimes', 'size'
27
+ ],
28
+ fieldDependentRules: [
29
+ 'same', 'confirmed', 'different', 'required_if', 'required_unless', 'required_with', 'required_with_all',
30
+ 'required_without', 'required_without_all'
31
+ ],
32
+ filedOnlyDependentRules: [
33
+ 'required_if', 'required_unless', 'required_with', 'required_with_all', 'required_without', 'required_without_all'
34
+ ],
35
+ fieldDefaultNameRule: [
36
+ 'required_without', 'required_without_all'
37
+ ],
38
+ asyncRules: [
39
+ 'unique', 'exists', 'dimension'
40
+ ],
41
+ emitMethods: [
42
+ 'credit_card', 'debit_card', 'strength'
43
+ ],
44
+ /****
45
+ * Credit Card Issuer with Regex Expression
46
+ ****/
47
+ credit_card: [
48
+ { name: 'American Express', id: 'AMEX', regex: '^3[47]' },
49
+ { name: 'Discover', id: 'DISCOVER', regex: '^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)' },
50
+ { name: 'JCB', id: 'JCB', regex: '^(?:2131|1800|35\d{3})\d{11}$' },
51
+ { name: 'MasterCard', id: 'MASTER_CARD', regex: '^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$' },
52
+ { name: 'Diners', id: 'DINERS', regex: '^36' },
53
+ { name: 'Diners - Carte Blanche', id: 'DINERS_CARTE_BLANCHE', regex: '^30[0-5]' },
54
+ { name: 'Visa Electron', id: 'VISA_ELECTRON', regex: '^(4026|417500|4508|4844|491(3|7))' },
55
+ { name: 'Visa', id: 'VISA', regex: '^4[0-9]{12}(?:[0-9]{3})?$' },
56
+ ],
57
+ /****
58
+ * Debit Card Issuer with Regex Expression
59
+ ****/
60
+ debit_card: [
61
+ { name: 'American Express', id: 'AMEX', regex: '^3[47]' },
62
+ { name: 'Discover', id: 'DISCOVER', regex: '^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)' },
63
+ { name: 'JCB', id: 'JCB', regex: '^(?:2131|1800|35\d{3})\d{11}$' },
64
+ { name: 'MasterCard', id: 'MASTER_CARD', regex: '^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$' },
65
+ { name: 'Diners', id: 'DINERS', regex: '^36' },
66
+ { name: 'Diners - Carte Blanche', id: 'DINERS_CARTE_BLANCHE', regex: '^30[0-5]' },
67
+ { name: 'Visa Electron', id: 'VISA_ELECTRON', regex: '^(4026|417500|4508|4844|491(3|7))' },
68
+ { name: 'Visa', id: 'VISA', regex: '^4[0-9]{12}(?:[0-9]{3})?$' },
69
+ ],
70
+ /****
71
+ * String strength validation with Regex Expression
72
+ ****/
73
+ strength_default_color: '#6c757d',
74
+ strength_level: [
75
+ { id: 'a', description: 'String is of length 8.', regex: '.{8}' },
76
+ { id: 'b', description: 'String has one uppercase letters.', regex: '(?=.*[A-Z])' },
77
+ { id: 'c', description: 'String has one special case letter.', regex: '(?=.*[!@#$&*])' },
78
+ { id: 'd', description: 'String has one digits.', regex: '(?=.*[0-9])' },
79
+ { id: 'e', description: 'String has one lowercase letters.', regex: '(?=.*[a-z])' },
80
+ ],
81
+ strength_color: [
82
+ { max: 25, color: '#d9534f' },
83
+ { min: 26, max: 50, color: '#f0ad4e' },
84
+ { min: 51, max: 75, color: '#5bc0de' },
85
+ { min: 76, color: '#5cb85c' }
86
+ ]
87
+ };
88
+ const CUSTOM_OBJECT_NAME = 'ng_abs';
89
+ const DEFAULT_STRENGTH_COLOR = '#6c757d';
90
+ const DEFAULT_DATE_FORMAT = 'dd-MM-yyyy';
91
+ const DEFAULT_LOCALE_LANG = 'en';
92
+ const SUPPORTED_LOCALE_LANGS = ['ar', 'bn', 'de', 'en', 'es', 'fr', 'hi', 'ja', 'pt', 'ru', 'zh'];
93
+ const DEFAULT_TRIGGER_STATE = ['touched', 'dirty'];
94
+ const EMIT_METHODS = ['credit_card', 'debit_card', 'strength'];
95
+ const CROSS_FIELD_VALIDATORS = [
96
+ 'same', 'confirmed', 'different',
97
+ 'required_if', 'required_unless',
98
+ 'required_with', 'required_with_all',
99
+ 'required_without', 'required_without_all'
100
+ ];
101
+ const ASYNC_RULES = ['unique', 'exists', 'dimension'];
102
+ const FILE_TYPE_RULES = ['image', 'video', 'mimes', 'size'];
103
+
104
+ class NgAbsoluteValidatorService {
105
+ constructor(config) {
106
+ this.config = config;
107
+ this.VLIDATOR_CONFIG = {};
108
+ this.init();
109
+ }
110
+ init() {
111
+ this.VLIDATOR_CONFIG = this.config;
112
+ }
113
+ /**
114
+ * @description This method give is remote locader is enable or not
115
+ * @returns Boolean
116
+ **/
117
+ get remoteLoader() {
118
+ return (typeof this.VLIDATOR_CONFIG.remoteLoader === 'undefined') ? true : this.VLIDATOR_CONFIG.remoteLoader;
119
+ }
120
+ /**
121
+ * @description This method give is remote locader is enable or not
122
+ * @returns Boolean
123
+ **/
124
+ get strengthBar() {
125
+ return (typeof this.VLIDATOR_CONFIG.strengthBar === 'undefined') ? true : this.VLIDATOR_CONFIG.strengthBar;
126
+ }
127
+ /**
128
+ * @description This method return the color of the bar based on config
129
+ * @returns Object
130
+ **/
131
+ get strengthColor() {
132
+ let strColor = this.VLIDATOR_CONFIG.strengthColor;
133
+ return (typeof strColor === 'object') ? strColor : GlobalConstant.strength_color;
134
+ }
135
+ /**
136
+ * @description This method return the list of regex config to vlidate
137
+ * @returns Object
138
+ **/
139
+ get strengthLevel() {
140
+ let level = this.VLIDATOR_CONFIG.strengthLevel || {};
141
+ return Object.assign(GlobalConstant.strength_level, level);
142
+ }
143
+ /**
144
+ * @description This method check is the loader should display or not
145
+ * @returns boolean
146
+ **/
147
+ get delayLoader() {
148
+ return this.VLIDATOR_CONFIG.delayLoader || 0;
149
+ }
150
+ /**
151
+ * @description This method state of triger validation
152
+ * @returns boolean
153
+ **/
154
+ get showErrorOn() {
155
+ return (this.VLIDATOR_CONFIG.showErrorOn || DEFAULT_TRIGGER_STATE);
156
+ }
157
+ }
158
+ NgAbsoluteValidatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorService, deps: [{ token: LIB_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
159
+ NgAbsoluteValidatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorService });
160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorService, decorators: [{
161
+ type: Injectable
162
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
163
+ type: Inject,
164
+ args: [LIB_CONFIG]
165
+ }] }]; } });
166
+
167
+ class NgAbsoluteValidatorComponent {
168
+ constructor(avs, translate, formGroupDirective, ngForm) {
169
+ this.avs = avs;
170
+ this.translate = translate;
171
+ this.formGroupDirective = formGroupDirective;
172
+ this.ngForm = ngForm;
173
+ this.indicatorColor = DEFAULT_STRENGTH_COLOR;
174
+ this.indicatorScore = 0;
175
+ this.invalid = true;
176
+ this.dirty = false;
177
+ this.touched = false;
178
+ this.isLoaderOn = false;
179
+ this.isStrengthBarOn = false;
180
+ this.errorMessage = {};
181
+ this.ngAbsData = {};
182
+ this.destroy$ = new Subject();
183
+ this.loader = true;
184
+ this.message = {};
185
+ this.defaultError = true;
186
+ this.showErrorOn = [];
187
+ this.onValid = new EventEmitter();
188
+ this.onValidate = new EventEmitter();
189
+ const langCode = (navigator.language || DEFAULT_LOCALE_LANG).split('-')[0];
190
+ this.translate.setDefaultLang(langCode);
191
+ this.translate.use(DEFAULT_LOCALE_LANG);
192
+ }
193
+ ngOnInit() {
194
+ this.isLoaderOn = this.loader === true ? this.avs.remoteLoader : false;
195
+ this.isStrengthBarOn = this.avs.strengthBar;
196
+ this.strength_color = this.avs.strengthColor;
197
+ this.doCheckAndValidate();
198
+ }
199
+ get errorContext() {
200
+ return {
201
+ $implicit: this.errorMessage
202
+ };
203
+ }
204
+ get progressContext() {
205
+ return {
206
+ $implicit: this.indicatorScore,
207
+ color: this.indicatorColor
208
+ };
209
+ }
210
+ get isSubmitted() {
211
+ return this.formGroupDirective?.submitted ?? this.ngForm?.submitted ?? false;
212
+ }
213
+ get errorTriggerOn() {
214
+ if (this.showErrorOn.length > 0) {
215
+ return this.showErrorOn;
216
+ }
217
+ if (this.formGroupDirective?.errorTriggerOn?.length > 0) {
218
+ return this.formGroupDirective.errorTriggerOn;
219
+ }
220
+ if (this.ngForm?.errorTriggerOn?.length > 0) {
221
+ return this.ngForm.errorTriggerOn;
222
+ }
223
+ if (this.avs.showErrorOn.length > 0) {
224
+ return this.avs.showErrorOn;
225
+ }
226
+ return DEFAULT_TRIGGER_STATE;
227
+ }
228
+ /**
229
+ * @description This method check the rule has dependency with another field or not
230
+ * @return boolean
231
+ **/
232
+ get isDisplay() {
233
+ let isDependent = (this.ngAbsData.validators || [])
234
+ .some((rule) => CROSS_FIELD_VALIDATORS.includes(rule));
235
+ if (this.errorTriggerOn.includes('submit')) {
236
+ return this.isSubmitted && this.invalid;
237
+ }
238
+ if (this.errorTriggerOn.includes('always')) {
239
+ return this.invalid;
240
+ }
241
+ return this.invalid
242
+ && (isDependent || this.errorTriggerOn.every((on) => this.formInstance[on]));
243
+ }
244
+ /**
245
+ * @description This method check and validate the mathod
246
+ * @return void
247
+ **/
248
+ doCheckAndValidate() {
249
+ this.setNgAbsData(this.formInstance); // Need Only For Reactive Validation
250
+ this.errorMessage = this.generateMessage(this.formInstance.errors, this.message, true); // Need Only For Reactive Validation
251
+ this.formInstance.statusChanges.pipe(debounceTime(200), takeUntil(this.destroy$)).subscribe(() => {
252
+ this.inputValue = this.formInstance.value;
253
+ this.invalid = this.formInstance.invalid;
254
+ this.dirty = this.formInstance.dirty;
255
+ this.touched = this.formInstance.touched;
256
+ this.errorMessage = this.generateMessage(this.formInstance.errors, this.message, true);
257
+ this.setNgAbsData(this.formInstance);
258
+ this.emitedData(this.formInstance);
259
+ });
260
+ }
261
+ /**
262
+ * @description This method set the validate methods taking from Template/Reactive from
263
+ * @return void
264
+ **/
265
+ setNgAbsData(formInstance) {
266
+ this.ngAbsData = formInstance[CUSTOM_OBJECT_NAME] || (formInstance.control ? (formInstance.control[CUSTOM_OBJECT_NAME] || {}) : {});
267
+ }
268
+ /**
269
+ * @description This method set strength color with max and min range object
270
+ * @return void
271
+ **/
272
+ getStrengthClass(strengthData) {
273
+ if (!!!strengthData.strength)
274
+ return;
275
+ strengthData = strengthData.strength;
276
+ this.indicatorScore = strengthData && strengthData.score && !!this.inputValue ? strengthData.score : 0;
277
+ let strength = this.strength_color.find((v) => (this.indicatorScore >= (v.min || -9999) && this.indicatorScore <= (v.max || 9999)));
278
+ this.indicatorColor = strength ? strength.color : DEFAULT_STRENGTH_COLOR;
279
+ }
280
+ /**
281
+ * @description This method trigger event and return the validation information
282
+ * @return void
283
+ **/
284
+ emitedData(formInstance) {
285
+ let emited = {};
286
+ emited['isValid'] = formInstance.valid;
287
+ emited['isPending'] = formInstance.pending;
288
+ if (this.ngAbsData) {
289
+ this.getStrengthClass(this.ngAbsData);
290
+ emited['data'] = this.ngAbsData;
291
+ }
292
+ this.onValid.emit(emited);
293
+ this.onValidate.emit(formInstance.errors);
294
+ }
295
+ /**
296
+ * @description This method generate message
297
+ * @return object
298
+ **/
299
+ generateMessage(messageObject, message, is_array = false) {
300
+ messageObject = Object.assign(messageObject || {}, message);
301
+ if (is_array) {
302
+ return Object.keys(messageObject || {}).map(i => messageObject[i]);
303
+ }
304
+ else {
305
+ return messageObject;
306
+ }
307
+ }
308
+ ngOnDestroy() {
309
+ this.destroy$.next();
310
+ this.destroy$.complete();
311
+ }
312
+ }
313
+ NgAbsoluteValidatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorComponent, deps: [{ token: NgAbsoluteValidatorService }, { token: i1.TranslateService }, { token: FormGroupDirective, optional: true }, { token: NgForm, optional: true }], target: i0.ɵɵFactoryTarget.Component });
314
+ NgAbsoluteValidatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgAbsoluteValidatorComponent, selector: "ng-absolute-validator", inputs: { formInstance: "formInstance", loader: "loader", message: "message", defaultError: "defaultError", showErrorOn: "showErrorOn" }, outputs: { onValid: "onValid", onValidate: "onValidate" }, queries: [{ propertyName: "absError", first: true, predicate: ["absError"], descendants: true }, { propertyName: "absProgress", first: true, predicate: ["absProgress"], descendants: true }, { propertyName: "absLoader", first: true, predicate: ["absLoader"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"formInstance.pending && isLoaderOn\">\r\n <div class=\"av-loading-panel\">\r\n <ng-template [ngTemplateOutlet]=\"absLoader ?? absFbLoader\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"(formInstance.control?.ng_abs?.strength || formInstance?.ng_abs?.strength ) && isStrengthBarOn && indicatorScore > 0\">\r\n <div class=\"av-progress\">\r\n <ng-template [ngTemplateOutlet]=\"absProgress ?? absFbProgress\" [ngTemplateOutletContext]=\"progressContext\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"isDisplay && defaultError && errorMessage.length > 0\">\r\n <div class=\"av-error-panel\">\r\n <ng-template [ngTemplateOutlet]=\"absError ?? absFbError\"[ngTemplateOutletContext]=\"errorContext\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #absFbLoader>\r\n <div class=\"av-loading\" >\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #absFbProgress>\r\n <div\r\n\t\tclass=\"av-progress-bar\"\r\n\t\trole=\"progressbar\"\r\n\t\taria-valuenow=\"40\"\r\n\t\taria-valuemin=\"0\"\r\n\t\taria-valuemax=\"100\"\r\n\t\t[style.background-color]=\"indicatorColor\"\r\n\t\t[style.width.%]=\"indicatorScore\">\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #absFbError>\r\n <ul class=\"av-errors-list\">\r\n <ng-container *ngFor=\"let error of errorMessage\">\r\n <li [innerText]=\"error\"></li>\r\n </ng-container>\r\n </ul>\r\n</ng-template>\r\n", styles: [".av-progress{display:flex}.av-progress-bar{margin-top:5px;float:left;width:0%;height:3px;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px #00000026;transition:width .6s ease}.av-progress-bar.active,.av-progress.active .av-progress-bar{animation:av-progress-bar-stripes 2s linear infinite}.av-progress-bar-striped,.av-progress-striped .av-progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.av-progress-bar-success{background-color:#5cb85c}.av-progress-bar-info{background-color:#5bc0de}.av-progress-bar-warning{background-color:#f0ad4e}.av-progress-bar-danger{background-color:#d9534f}.av-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;color:#dc3545;line-height:1.6em;opacity:1;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}@keyframes av-loading{0%{left:32px;transform:scale(0)}25%{left:32px;transform:scale(1)}50%{left:100px}75%{left:168px;transform:scale(1)}to{left:168px;transform:scale(0)}}.av-loading{position:relative;width:100%;height:100%}.av-loading>div{position:absolute;transform:translate(-50%,-50%);width:40px;height:40px}.av-loading div>div{width:40px;height:40px;border-radius:50%;background:#f00;position:absolute;top:100px;left:32px;animation:av-loading .8s cubic-bezier(0,.5,.5,1) infinite forwards}.av-loading div:nth-child(1) div{animation:av-loading-2 .8s cubic-bezier(0,.5,.5,1) infinite forwards;background:#dce4eb}.av-loading div:nth-child(2) div{animation-delay:-.4s;background:#bbcedd}.av-loading div:nth-child(3) div{animation-delay:-.2s;background:#85a2b6}.av-loading div:nth-child(4) div{animation-delay:0s;background:#fdfdfd}.av-loading div:nth-child(5) div{animation:av-loading-3 .8s cubic-bezier(0,.5,.5,1) infinite forwards;background:#dce4eb}.av-loading{width:32px!important;height:32px!important;transform:translate(-16px,-16px) scale(.16) translate(16px,16px)}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorComponent, decorators: [{
316
+ type: Component,
317
+ args: [{ selector: 'ng-absolute-validator', template: "<ng-container *ngIf=\"formInstance.pending && isLoaderOn\">\r\n <div class=\"av-loading-panel\">\r\n <ng-template [ngTemplateOutlet]=\"absLoader ?? absFbLoader\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"(formInstance.control?.ng_abs?.strength || formInstance?.ng_abs?.strength ) && isStrengthBarOn && indicatorScore > 0\">\r\n <div class=\"av-progress\">\r\n <ng-template [ngTemplateOutlet]=\"absProgress ?? absFbProgress\" [ngTemplateOutletContext]=\"progressContext\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"isDisplay && defaultError && errorMessage.length > 0\">\r\n <div class=\"av-error-panel\">\r\n <ng-template [ngTemplateOutlet]=\"absError ?? absFbError\"[ngTemplateOutletContext]=\"errorContext\"></ng-template>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-template #absFbLoader>\r\n <div class=\"av-loading\" >\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n <div><div></div></div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #absFbProgress>\r\n <div\r\n\t\tclass=\"av-progress-bar\"\r\n\t\trole=\"progressbar\"\r\n\t\taria-valuenow=\"40\"\r\n\t\taria-valuemin=\"0\"\r\n\t\taria-valuemax=\"100\"\r\n\t\t[style.background-color]=\"indicatorColor\"\r\n\t\t[style.width.%]=\"indicatorScore\">\r\n\t</div>\r\n</ng-template>\r\n\r\n<ng-template #absFbError>\r\n <ul class=\"av-errors-list\">\r\n <ng-container *ngFor=\"let error of errorMessage\">\r\n <li [innerText]=\"error\"></li>\r\n </ng-container>\r\n </ul>\r\n</ng-template>\r\n", styles: [".av-progress{display:flex}.av-progress-bar{margin-top:5px;float:left;width:0%;height:3px;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px #00000026;transition:width .6s ease}.av-progress-bar.active,.av-progress.active .av-progress-bar{animation:av-progress-bar-stripes 2s linear infinite}.av-progress-bar-striped,.av-progress-striped .av-progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.av-progress-bar-success{background-color:#5cb85c}.av-progress-bar-info{background-color:#5bc0de}.av-progress-bar-warning{background-color:#f0ad4e}.av-progress-bar-danger{background-color:#d9534f}.av-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;color:#dc3545;line-height:1.6em;opacity:1;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}@keyframes av-loading{0%{left:32px;transform:scale(0)}25%{left:32px;transform:scale(1)}50%{left:100px}75%{left:168px;transform:scale(1)}to{left:168px;transform:scale(0)}}.av-loading{position:relative;width:100%;height:100%}.av-loading>div{position:absolute;transform:translate(-50%,-50%);width:40px;height:40px}.av-loading div>div{width:40px;height:40px;border-radius:50%;background:#f00;position:absolute;top:100px;left:32px;animation:av-loading .8s cubic-bezier(0,.5,.5,1) infinite forwards}.av-loading div:nth-child(1) div{animation:av-loading-2 .8s cubic-bezier(0,.5,.5,1) infinite forwards;background:#dce4eb}.av-loading div:nth-child(2) div{animation-delay:-.4s;background:#bbcedd}.av-loading div:nth-child(3) div{animation-delay:-.2s;background:#85a2b6}.av-loading div:nth-child(4) div{animation-delay:0s;background:#fdfdfd}.av-loading div:nth-child(5) div{animation:av-loading-3 .8s cubic-bezier(0,.5,.5,1) infinite forwards;background:#dce4eb}.av-loading{width:32px!important;height:32px!important;transform:translate(-16px,-16px) scale(.16) translate(16px,16px)}\n"] }]
318
+ }], ctorParameters: function () { return [{ type: NgAbsoluteValidatorService }, { type: i1.TranslateService }, { type: undefined, decorators: [{
319
+ type: Optional
320
+ }, {
321
+ type: Inject,
322
+ args: [FormGroupDirective]
323
+ }] }, { type: undefined, decorators: [{
324
+ type: Optional
325
+ }, {
326
+ type: Inject,
327
+ args: [NgForm]
328
+ }] }]; }, propDecorators: { formInstance: [{
329
+ type: Input
330
+ }], loader: [{
331
+ type: Input
332
+ }], message: [{
333
+ type: Input
334
+ }], defaultError: [{
335
+ type: Input
336
+ }], showErrorOn: [{
337
+ type: Input
338
+ }], onValid: [{
339
+ type: Output
340
+ }], onValidate: [{
341
+ type: Output
342
+ }], absError: [{
343
+ type: ContentChild,
344
+ args: ['absError']
345
+ }], absProgress: [{
346
+ type: ContentChild,
347
+ args: ['absProgress']
348
+ }], absLoader: [{
349
+ type: ContentChild,
350
+ args: ['absLoader']
351
+ }] } });
352
+
353
+ const toArray = (value, seperator = ',') => {
354
+ let DataArray = (typeof value === 'string' && value.indexOf(seperator) >= 0)
355
+ ? value.split(seperator) : (isArray(value) ? value : [value]);
356
+ return DataArray.filter(item => Boolean(item) && !isEmptyObject(item));
357
+ };
358
+ const isArray = (actualData) => {
359
+ if (typeof actualData === 'string' && json(actualData)) {
360
+ actualData = JSON.parse(actualData);
361
+ }
362
+ return Array.isArray(actualData);
363
+ };
364
+ const isEmptyObject = (value) => {
365
+ return (value !== null &&
366
+ typeof value === 'object' &&
367
+ !Array.isArray(value) &&
368
+ Object.keys(value).length === 0);
369
+ };
370
+ const camelCase = (string) => {
371
+ return string.toLowerCase()
372
+ .replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => chr.toUpperCase());
373
+ };
374
+ const json = (string) => {
375
+ if (!string)
376
+ return false;
377
+ try {
378
+ JSON.parse(string);
379
+ }
380
+ catch (e) {
381
+ return false;
382
+ }
383
+ return true;
384
+ };
385
+ const bytesToSize = (bytes, seperator = "") => {
386
+ let sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
387
+ if (bytes == 0)
388
+ return null;
389
+ let number = Math.floor(Math.log(bytes) / Math.log(1024)).toString();
390
+ let i = parseInt(number, 10);
391
+ if (i === 0)
392
+ return `${bytes}${seperator}${sizes[i]}`;
393
+ return `${(bytes / (1024 ** i)).toFixed(1)}${seperator}${sizes[i]}`;
394
+ };
395
+ function toCharClass(chars) {
396
+ return chars.replace(/[\\\]^-]/g, '\\$&');
397
+ }
398
+ function cloneDeep(data) {
399
+ return JSON.parse(JSON.stringify(data));
400
+ }
401
+
402
+ class MessageBuilderService {
403
+ constructor(ts) {
404
+ this.ts = ts;
405
+ }
406
+ call(langAttr, attribute, ...args) {
407
+ let message = '';
408
+ let [lastElement] = args.slice(-1);
409
+ let template = this.ts.instant(langAttr) || '';
410
+ let hasCustomTemplate = typeof lastElement === 'object' && Object.keys(lastElement).length > 0;
411
+ if (hasCustomTemplate && lastElement[langAttr] && lastElement[langAttr][this.ts.currentLang]) {
412
+ template = lastElement[langAttr][this.ts.currentLang];
413
+ }
414
+ if (hasCustomTemplate && lastElement[this.ts.currentLang]) {
415
+ template = lastElement[this.ts.currentLang];
416
+ }
417
+ if (attribute && template) {
418
+ message = template.replace(':attribute', attribute);
419
+ }
420
+ if (args.length === 0) {
421
+ return message;
422
+ }
423
+ args.forEach((v, index) => {
424
+ let replaceWithOne = `:arg${index}`;
425
+ let replaceWithMulti = `:arg${index}:`;
426
+ if (message.includes(replaceWithMulti)) {
427
+ args = args.splice(index);
428
+ let argString = toArray(args) ? toArray(args).join(',') : args;
429
+ message = message.replace(replaceWithMulti, argString);
430
+ }
431
+ if (message.includes(replaceWithOne)) {
432
+ message = message.replace(replaceWithOne, v);
433
+ }
434
+ });
435
+ return message;
436
+ }
437
+ }
438
+ MessageBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MessageBuilderService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
439
+ MessageBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MessageBuilderService });
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MessageBuilderService, decorators: [{
441
+ type: Injectable
442
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
443
+
444
+ class HttpRequestService {
445
+ constructor(http) {
446
+ this.http = http;
447
+ }
448
+ get(action_url, params = {}) {
449
+ return this.http.get(action_url, { params });
450
+ }
451
+ post(action_url, data = {}, params = {}) {
452
+ return this.http.post(action_url, data, { params });
453
+ }
454
+ }
455
+ HttpRequestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpRequestService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
456
+ HttpRequestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpRequestService });
457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpRequestService, decorators: [{
458
+ type: Injectable
459
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
460
+
461
+ class UtilService {
462
+ constructor(http, abs) {
463
+ this.http = http;
464
+ this.abs = abs;
465
+ this.defaultTimeZone = 'DD-MM-YYYY';
466
+ this.creditCardIssuers = GlobalConstant.credit_card;
467
+ this.debitCardIssuers = GlobalConstant.debit_card;
468
+ this.customObjectName = GlobalConstant.customObjectName;
469
+ this.customRulesName = GlobalConstant.customRulesName;
470
+ this.stringStrength = [];
471
+ this.init();
472
+ }
473
+ init() {
474
+ this.stringStrength = this.abs.strengthLevel;
475
+ }
476
+ setValidationRules(control, rules, appends = {}) {
477
+ let customObjectName = this.customObjectName;
478
+ let customRulesName = this.customRulesName;
479
+ let ruleArray = Array.isArray(rules) ? rules : [rules];
480
+ let activeRules = !!control[customObjectName] && !!control[customObjectName][customRulesName] ? control[customObjectName][customRulesName] : [];
481
+ let finalObject = Object.assign({
482
+ validators: Array.from(new Set(activeRules.concat(ruleArray)))
483
+ }, appends);
484
+ control[customObjectName] = finalObject;
485
+ }
486
+ json(string) {
487
+ if (!string)
488
+ return false;
489
+ try {
490
+ JSON.parse(string);
491
+ }
492
+ catch (e) {
493
+ return false;
494
+ }
495
+ return true;
496
+ }
497
+ confirmed(control, args, fieldName = null) {
498
+ fieldName = fieldName || control['field_name'] || null;
499
+ let compared_field_name = args || (`${fieldName}_confirmation`);
500
+ let toCompareWith = control.root.get(compared_field_name);
501
+ return (control.value === toCompareWith?.value);
502
+ }
503
+ same(control, args) {
504
+ let toCompareWith = control.root.get(args);
505
+ return (control.value === toCompareWith?.value);
506
+ }
507
+ different(control, args) {
508
+ let toCompareWith = control.root.get(args);
509
+ return (control.value !== toCompareWith?.value);
510
+ }
511
+ required(actualData) {
512
+ return !!actualData;
513
+ }
514
+ requiredIf(control, args) {
515
+ let [dependent, matchWith] = toArray(args);
516
+ if (!dependent || !matchWith) {
517
+ return false;
518
+ }
519
+ let toCompareWith = control.root.get(dependent);
520
+ return (toCompareWith.value === matchWith) ? this.required(control.value) : true;
521
+ }
522
+ requiredUnless(control, args) {
523
+ let [dependent, ...matchWith] = toArray(args);
524
+ if (!dependent && matchWith.length === 0) {
525
+ return false;
526
+ }
527
+ let toCompareWith = control.root.get(dependent);
528
+ return matchWith.some(item => item === toCompareWith.value) ? this.required(control.value) : true;
529
+ }
530
+ requiredWith(control, args) {
531
+ let names = toArray(args);
532
+ let anyHasValue = names.some(name => {
533
+ const c = control.root.get(name);
534
+ return c && c.value !== null && c.value !== undefined && c.value !== '';
535
+ });
536
+ return anyHasValue ? this.required(control.value) : true;
537
+ }
538
+ requiredWithAll(control, args) {
539
+ let matchWith = toArray(args);
540
+ let compareWithValue = matchWith.map(name => control.root.get(name).value);
541
+ return compareWithValue.filter(Boolean).length === matchWith.length ? this.required(control.value) : true;
542
+ }
543
+ requiredWithout(control, args) {
544
+ let matchWith = toArray(args);
545
+ let compareWithValue = matchWith.map(name => control.root.get(name).value);
546
+ return compareWithValue.filter(Boolean).length === 0 ? this.required(control.value) : true;
547
+ }
548
+ requiredWithoutAll(control, args) {
549
+ let matchWith = toArray(args);
550
+ let compareWithValue = matchWith.map(name => control.root.get(name).value);
551
+ let emptyFieldCount = compareWithValue.filter((value) => value === '' || value === null || value === undefined);
552
+ return emptyFieldCount.length > 0 ? this.required(control.value) : true;
553
+ }
554
+ email(actualData) {
555
+ return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(actualData));
556
+ }
557
+ above(actualData, toBeData) {
558
+ return (Number(toBeData) < Number(actualData));
559
+ }
560
+ accepted(actualData) {
561
+ return (actualData || actualData !== false || actualData !== 0);
562
+ }
563
+ date(actualData, format = DEFAULT_DATE_FORMAT) {
564
+ try {
565
+ return actualData ? isValid(parse(actualData, format || DEFAULT_DATE_FORMAT, new Date())) : true;
566
+ }
567
+ catch (e) {
568
+ return false;
569
+ }
570
+ }
571
+ dateFormat(actualData, format = DEFAULT_DATE_FORMAT) {
572
+ try {
573
+ return actualData ? isValid(parse(actualData, format || DEFAULT_DATE_FORMAT, new Date())) : true;
574
+ }
575
+ catch (e) {
576
+ return false;
577
+ }
578
+ }
579
+ after(actualData, toBeData) {
580
+ if (!!!actualData || !!!toBeData) {
581
+ return false;
582
+ }
583
+ let [matchWithDate, matchWithDateFormat = DEFAULT_DATE_FORMAT] = Array.isArray(toBeData) ? toBeData : toBeData.split(',');
584
+ if (!this.dateFormat(actualData, matchWithDateFormat) || !this.dateFormat(matchWithDate, matchWithDateFormat)) {
585
+ return false;
586
+ }
587
+ return isAfter(parse(actualData, matchWithDateFormat, new Date()), parse(matchWithDate, matchWithDateFormat, new Date()));
588
+ }
589
+ before(actualData, toBeData) {
590
+ if (!!!actualData || !!!toBeData) {
591
+ return false;
592
+ }
593
+ let [matchWithDate, matchWithDateFormat = DEFAULT_DATE_FORMAT] = Array.isArray(toBeData) ? toBeData : toBeData.split(',');
594
+ if (!this.dateFormat(actualData, matchWithDateFormat) || !this.dateFormat(matchWithDate, matchWithDateFormat)) {
595
+ return false;
596
+ }
597
+ return isBefore(parse(actualData, matchWithDateFormat, new Date()), parse(matchWithDate, matchWithDateFormat, new Date()));
598
+ }
599
+ alpha(actualData) {
600
+ return (/^[a-z]+$/i.test(actualData));
601
+ }
602
+ alphaNumeric(actualData) {
603
+ return (/^[a-z0-9]+$/i.test(actualData));
604
+ }
605
+ alphaDash(actualData) {
606
+ return this.regex(actualData, '^[a-zA-Z0-9-_]+$');
607
+ }
608
+ array(actualData) {
609
+ if (typeof actualData === 'string' && this.json(actualData)) {
610
+ actualData = JSON.parse(actualData);
611
+ }
612
+ return Array.isArray(actualData);
613
+ }
614
+ boolean(actualData) {
615
+ let booleanAccepted = [
616
+ 1, '1', 0, '0', 'true', true, 'false', 'false'
617
+ ];
618
+ return booleanAccepted.includes(actualData);
619
+ }
620
+ equals(actualData, compared_to_value) {
621
+ return (actualData == compared_to_value);
622
+ }
623
+ endsWith(actualData, end_with) {
624
+ let _end_with = toArray(end_with);
625
+ return !_end_with.find((v) => actualData && actualData.endsWith(v));
626
+ }
627
+ startsWith(actualData, start_with) {
628
+ return toArray(start_with).some((v) => actualData && actualData.startsWith(v));
629
+ }
630
+ in(actualData, compare) {
631
+ let toCompare = new Set(toArray(compare).map(v => v.toString()));
632
+ return toCompare.has(actualData);
633
+ }
634
+ notIn(actualData, compare) {
635
+ return !this.in(actualData, compare);
636
+ }
637
+ includes(actualData, compare) {
638
+ if (!actualData)
639
+ return false;
640
+ return toArray(compare).every(v => actualData.includes(v.toString()));
641
+ }
642
+ number(actualData) {
643
+ return !isNaN(actualData);
644
+ }
645
+ string(actualData) {
646
+ return isNaN(actualData);
647
+ }
648
+ integer(actualData) {
649
+ if (!this.number(actualData))
650
+ return false;
651
+ return Number.isInteger(Number(actualData));
652
+ }
653
+ ip(actualData) {
654
+ let regexExp = [
655
+ '^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',
656
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',
657
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',
658
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
659
+ ].join("\\.");
660
+ return this.regex(actualData, regexExp);
661
+ }
662
+ ipv4(actualData) {
663
+ let regexExp = new RegExp('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$');
664
+ return regexExp.test(actualData);
665
+ }
666
+ ipv6(actualData) {
667
+ let regexExp = new RegExp('^([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}$');
668
+ return regexExp.test(actualData);
669
+ }
670
+ max(actualData, max) {
671
+ if (!actualData)
672
+ return false;
673
+ if (this.integer(actualData)) {
674
+ return actualData <= max;
675
+ }
676
+ else {
677
+ return (actualData.length <= max);
678
+ }
679
+ }
680
+ min(actualData, min) {
681
+ if (!!!actualData || !!!min)
682
+ return false;
683
+ if (this.integer(actualData)) {
684
+ return Number(actualData) >= Number(min);
685
+ }
686
+ else {
687
+ return (actualData.length >= min);
688
+ }
689
+ }
690
+ notEquals(actualData, compare_to) {
691
+ return !this.equals(actualData, compare_to);
692
+ }
693
+ range(actualData, range) {
694
+ let [min, max] = toArray(range);
695
+ return (Number(min) <= Number(actualData)) && (Number(actualData) <= Number(max));
696
+ }
697
+ between(actualData, range) {
698
+ let [min, max] = toArray(range);
699
+ return (Number(min) < Number(actualData)) && (Number(actualData) < Number(max));
700
+ }
701
+ under(actualData, under) {
702
+ if (!this.number(actualData))
703
+ return false;
704
+ return Number(actualData) < Number(under);
705
+ }
706
+ url(actualData) {
707
+ let regexExp = [
708
+ '^(?:(?:http(?:s)?|ftp)://)(?:\\S+(?::(?:\\S)*)?@)?(?:(?:[a-z0-9\u00a1-\uffff](?:-)*)',
709
+ '(?:[a-z0-9\u00a1-\uffff])+)(?:\\.(?:[a-z0-9\u00a1-\uffff](?:-)*)',
710
+ '(?:[a-z0-9\u00a1-\uffff])+)',
711
+ '(?:\\.(?:[a-z0-9\u00a1-\uffff]){2,})(?::(?:\\d){2,5})?(?:/(?:\\S)*)?$'
712
+ ].join('*');
713
+ return this.regex(actualData, regexExp);
714
+ }
715
+ regex(actualData, expression) {
716
+ let regexExp = new RegExp(expression);
717
+ return regexExp.test(actualData);
718
+ }
719
+ notRegex(actualData, expression) {
720
+ return !this.regex(actualData, expression);
721
+ }
722
+ uuid(actualData) {
723
+ return this.regex(actualData, '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}');
724
+ }
725
+ unique(args) {
726
+ let http;
727
+ let action = args.url;
728
+ let method = args.method || 'GET';
729
+ let request = args.request || {};
730
+ let params = args.params || {};
731
+ if (action || Object.keys(request).length === 0) {
732
+ return of(false);
733
+ }
734
+ switch (method) {
735
+ case 'POST':
736
+ http = this.http.post(action, request, params);
737
+ break;
738
+ default:
739
+ http = this.http.get(action, { ...request, ...params });
740
+ }
741
+ return http.pipe(map((data) => (data && data.length === 0)));
742
+ }
743
+ exists(args) {
744
+ let http;
745
+ let action = args.url;
746
+ let method = args.method || 'GET';
747
+ let request = args.request || {};
748
+ let params = args.params || {};
749
+ if (!action || Object.keys(request).length === 0) {
750
+ return of(false);
751
+ }
752
+ switch (method) {
753
+ case 'POST':
754
+ http = this.http.post(action, request, params);
755
+ break;
756
+ default:
757
+ http = this.http.get(action, { ...request, ...params });
758
+ }
759
+ return http.pipe(map((data) => (data && data.length > 0)));
760
+ }
761
+ getCreditCardData(number) {
762
+ if (!number)
763
+ return;
764
+ number = number.toString();
765
+ let card_issuer = this.creditCardIssuers.find((card) => this.regex(number, card.regex));
766
+ return { issuer: (card_issuer ? card_issuer.name : null) };
767
+ }
768
+ creditCard(actualData) {
769
+ let cardInfo = this.getCreditCardData(actualData);
770
+ return cardInfo ? !!cardInfo.issuer : false;
771
+ }
772
+ getDebitCardData(number) {
773
+ if (!number)
774
+ return false;
775
+ let _number = number.toString();
776
+ let card_issuer = this.debitCardIssuers.find((card) => this.regex(_number, card.regex));
777
+ return { issuer: (card_issuer ? card_issuer.name : null) };
778
+ }
779
+ debitCard(actualData) {
780
+ let cardInfo = this.getDebitCardData(actualData);
781
+ return cardInfo ? !!cardInfo.issuer : false;
782
+ }
783
+ cvv(actualData) {
784
+ return this.regex(actualData, '^[0-9]{3,4}$');
785
+ }
786
+ getStrengthData(actualData, compare) {
787
+ if (!!!actualData)
788
+ return false;
789
+ let toCompare = toArray(compare);
790
+ let allowedStrength = [];
791
+ let activeStrength = [];
792
+ let inActiveStrength = [];
793
+ let strengthScore = 0;
794
+ let strength_color = this.abs.strengthColor;
795
+ let validStrength = strength_color[strength_color.length - 1];
796
+ let allowOnMaxScrore = this.number(toCompare[toCompare.length - 1]) ? toCompare[toCompare.length - 1] : validStrength.min || -9999;
797
+ let specialChars = "@%+\/'!#$^?:.(){}[]~-_";
798
+ var letters = new Object();
799
+ for (var i = 0; i < actualData.length; i++) {
800
+ let assignScore = specialChars.includes(actualData[i]) ? 8.0 : 5.0;
801
+ letters[actualData[i]] = (letters[actualData[i]] || 0) + 1;
802
+ strengthScore += assignScore / letters[actualData[i]];
803
+ }
804
+ let variationCount = 0;
805
+ this.stringStrength.forEach((v) => {
806
+ if (toCompare.indexOf(v.id) >= 0 || toCompare.length == 0) {
807
+ allowedStrength.push(v.id);
808
+ let isValid = this.regex(actualData, v.regex);
809
+ isValid ? activeStrength.push(v.id) : inActiveStrength.push(v.id);
810
+ variationCount += isValid ? 1 : 0;
811
+ }
812
+ });
813
+ strengthScore += (variationCount - 1) * 10;
814
+ strengthScore = Math.round(strengthScore);
815
+ if (inActiveStrength.length > 0) {
816
+ strengthScore = (strengthScore >= allowOnMaxScrore) ? allowOnMaxScrore - (inActiveStrength.length * 5) : strengthScore;
817
+ }
818
+ let sendObject = {
819
+ score: strengthScore,
820
+ allowedStrength: allowedStrength,
821
+ validFor: activeStrength,
822
+ validExcept: inActiveStrength,
823
+ allowOnMaxScore: allowOnMaxScrore
824
+ };
825
+ return sendObject;
826
+ }
827
+ strength(actualData, compare) {
828
+ let strength = this.getStrengthData(actualData, compare);
829
+ return (strength && strength.score >= strength.allowOnMaxScore);
830
+ }
831
+ phoneNo(actualData, expression = null) {
832
+ let regex = /\s*(?:\+?(\d{1,3}))?[\W\D\s]^|()*(\d[\W\D\s]*?\d[\D\W\s]*?\d)[\W\D\s]*(\d[\W\D\s]*?\d[\D\W\s]*?\d)[\W\D\s]*(\d[\W\D\s]*?\d[\D\W\s]*?\d[\W\D\s]*?\d)(?: *x(\d+))?\s*$/g;
833
+ return this.regex(actualData, expression || regex);
834
+ }
835
+ image(fileInstance) {
836
+ if (!!!fileInstance || fileInstance.length === 0)
837
+ return false;
838
+ let file = fileInstance[0];
839
+ return file.type.startsWith('image/');
840
+ }
841
+ video(fileInstance) {
842
+ if (!!!fileInstance || fileInstance.length === 0)
843
+ return false;
844
+ let file = fileInstance[0];
845
+ return file.type.startsWith('video/');
846
+ }
847
+ mimes(fileInstance, compare) {
848
+ if (!!!fileInstance || fileInstance.length === 0 || !!!compare)
849
+ return false;
850
+ let file = fileInstance[0];
851
+ let ext = file.name.split('.').pop();
852
+ let acceptType = toArray(compare);
853
+ let hasMime = acceptType.includes(ext);
854
+ return !!hasMime;
855
+ }
856
+ size(fileInstance, compare) {
857
+ if (!!!fileInstance || fileInstance.length == 0 || !!!compare)
858
+ return false;
859
+ let file = fileInstance[0];
860
+ return file.size <= compare * 1024;
861
+ }
862
+ dimension(fileInstance, compare) {
863
+ if (!!!fileInstance || fileInstance.length == 0 || compare.length === 0)
864
+ return of(false);
865
+ let file = fileInstance[0];
866
+ let type = file.type;
867
+ if (!type.startsWith('image/'))
868
+ return of(false);
869
+ let dimension = toArray(compare);
870
+ let image = new Image();
871
+ let height = 0;
872
+ let width = 0;
873
+ let ratio = 0;
874
+ let heightMatch = 'equal';
875
+ let widthMatch = 'equal';
876
+ //max_height=200 | max_height=200 | height = 200
877
+ //min_width=200 | min_width=200 | width = 200
878
+ //ratio=1.2
879
+ dimension.forEach(el => {
880
+ if (el.includes('_height=') || el.startsWith('height=')) {
881
+ height = parseInt(el.split('=')[1] || 0);
882
+ heightMatch = ['max', 'min'].includes((el.split('=')[0]).split('_')[0]) ? (el.split('=')[0]).split('_')[0] : 'equal';
883
+ }
884
+ if (el.includes('_width=') || el.startsWith('width=')) {
885
+ width = parseInt(el.split('=')[1] || 0);
886
+ widthMatch = ['max', 'min'].includes((el.split('=')[0]).split('_')[0]) ? (el.split('=')[0]).split('_')[0] : 'equal';
887
+ }
888
+ if (el.includes('ratio=')) {
889
+ ratio = parseFloat(el.split('=')[1]);
890
+ }
891
+ });
892
+ image.src = window.URL.createObjectURL(file);
893
+ return from(new Promise((resolve) => {
894
+ image.onload = () => {
895
+ let isValid = false;
896
+ if (ratio) {
897
+ isValid = ((image.width / image.height).toFixed(1) === ratio.toFixed(1));
898
+ }
899
+ else {
900
+ let isValidWidth = width ? this.doComparison(image.width, width, widthMatch) : true;
901
+ let isValidHeight = height ? this.doComparison(image.height, height, heightMatch) : true;
902
+ isValid = (isValidWidth && isValidHeight);
903
+ }
904
+ resolve(isValid);
905
+ };
906
+ }));
907
+ }
908
+ doComparison(matchWith, matchTo, operator = 'equal') {
909
+ let compareState = false;
910
+ if (operator == 'equal') {
911
+ compareState = matchWith == matchTo;
912
+ }
913
+ if (operator == 'min') {
914
+ compareState = matchWith >= matchTo;
915
+ }
916
+ if (operator == 'max') {
917
+ compareState = matchWith <= matchTo;
918
+ }
919
+ return compareState;
920
+ }
921
+ }
922
+ UtilService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UtilService, deps: [{ token: HttpRequestService }, { token: NgAbsoluteValidatorService }], target: i0.ɵɵFactoryTarget.Injectable });
923
+ UtilService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UtilService });
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UtilService, decorators: [{
925
+ type: Injectable
926
+ }], ctorParameters: function () { return [{ type: HttpRequestService }, { type: NgAbsoluteValidatorService }]; } });
927
+
928
+ class ValidateRuleService {
929
+ constructor(mb, utl) {
930
+ this.mb = mb;
931
+ this.utl = utl;
932
+ this.subMessageMethod = ['max', 'min'];
933
+ this.wiredRulesMap = new WeakMap();
934
+ }
935
+ gererateRuleAndValidate(fieldName, control, rule, custom_message) {
936
+ let messages = {};
937
+ let generateRules = toArray(rule, '|');
938
+ let activeRules = generateRules.map(v => v.includes(':') ? v.split(':')[0] : v);
939
+ let isRequiredGroup = !!activeRules.find(v => v.startsWith('required'));
940
+ if (!isRequiredGroup && !!!control.value) {
941
+ return null;
942
+ }
943
+ for (let i = 0; i < generateRules.length; i++) {
944
+ let isValid = null;
945
+ let controlArgs = null;
946
+ let emitData = {};
947
+ let rule = generateRules[i];
948
+ let methodName = rule.includes(':') ? rule.split(':')[0] : rule;
949
+ let args = rule.includes(':') ? rule.split(':')[1] : '';
950
+ let mulArg = args.includes(',') ? args.split(',') : [args];
951
+ let currentRule = methodName;
952
+ let isCrossFieldRule = CROSS_FIELD_VALIDATORS.includes(currentRule);
953
+ let messageKey = methodName;
954
+ methodName = camelCase(methodName);
955
+ let emitFnName = camelCase(`get_${messageKey}_data`);
956
+ if (typeof this.utl[methodName] !== 'function' || ASYNC_RULES.indexOf(methodName) >= 0)
957
+ continue;
958
+ if (this.subMessageMethod.indexOf(methodName) >= 0) {
959
+ messageKey = this.getMessageKeyRespectToValue(control.value, messageKey);
960
+ }
961
+ if (CROSS_FIELD_VALIDATORS.includes(messageKey)) {
962
+ controlArgs = control;
963
+ }
964
+ else if (FILE_TYPE_RULES.includes(messageKey)) {
965
+ controlArgs = control['nativeElement'] ? control['nativeElement']['files'] : null;
966
+ }
967
+ else {
968
+ controlArgs = control.value;
969
+ }
970
+ isCrossFieldRule && this.wireSiblingWatchers(controlArgs, fieldName, currentRule, args);
971
+ isValid = this.utl[methodName](controlArgs, args);
972
+ if (typeof this.utl[emitFnName] === 'function') {
973
+ emitData[messageKey] = this.utl[emitFnName](control.value, mulArg);
974
+ }
975
+ this.utl.setValidationRules(control, activeRules, emitData);
976
+ if (!isValid) {
977
+ messages[messageKey] = this.mb.call(messageKey, fieldName, ...mulArg, custom_message);
978
+ break;
979
+ }
980
+ }
981
+ if (Object.keys(messages).length > 0) {
982
+ return messages;
983
+ }
984
+ else {
985
+ return null;
986
+ }
987
+ }
988
+ getMessageKeyRespectToValue(value, messageKey) {
989
+ if (this.utl.array(value)) {
990
+ return `${messageKey}.array`;
991
+ }
992
+ if (this.utl.string(value)) {
993
+ return `${messageKey}.string`;
994
+ }
995
+ if (this.utl.integer(value)) {
996
+ return `${messageKey}.numeric`;
997
+ }
998
+ return messageKey;
999
+ }
1000
+ wireSiblingWatchers(control, input, rule, dependents) {
1001
+ let ctrlNames = toArray(dependents);
1002
+ if (rule === 'confirmed') {
1003
+ ctrlNames = [dependents || (`${input}_confirmation`)];
1004
+ }
1005
+ let wiredRules = this.wiredRulesMap.get(control);
1006
+ if (!wiredRules) {
1007
+ this.wiredRulesMap.set(control, true);
1008
+ ctrlNames.forEach(name => {
1009
+ let ctrl = control.root.get(name);
1010
+ if (ctrl) {
1011
+ ctrl.valueChanges.pipe(debounceTime$1(200))
1012
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
1013
+ }
1014
+ });
1015
+ }
1016
+ }
1017
+ }
1018
+ ValidateRuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidateRuleService, deps: [{ token: MessageBuilderService }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Injectable });
1019
+ ValidateRuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidateRuleService });
1020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidateRuleService, decorators: [{
1021
+ type: Injectable
1022
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: UtilService }]; } });
1023
+
1024
+ class RuleDirective {
1025
+ constructor(ruleValidate, el) {
1026
+ this.ruleValidate = ruleValidate;
1027
+ this.el = el;
1028
+ this.vmessage = {};
1029
+ this.fieldName = 'field';
1030
+ this.fieldName = this.el.nativeElement.name;
1031
+ }
1032
+ set message(data) {
1033
+ this.vmessage = data;
1034
+ }
1035
+ validate(control) {
1036
+ return this.ruleValidate.gererateRuleAndValidate(this.fieldName, control, this.rule, this.vmessage);
1037
+ }
1038
+ }
1039
+ RuleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RuleDirective, deps: [{ token: ValidateRuleService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1040
+ RuleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RuleDirective, selector: "[Rule], [rule]", inputs: { rule: ["Rule", "rule"], message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RuleDirective, multi: true }], ngImport: i0 });
1041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RuleDirective, decorators: [{
1042
+ type: Directive,
1043
+ args: [{
1044
+ selector: '[Rule], [rule]',
1045
+ providers: [{ provide: NG_VALIDATORS, useExisting: RuleDirective, multi: true }]
1046
+ }]
1047
+ }], ctorParameters: function () { return [{ type: ValidateRuleService }, { type: i0.ElementRef }]; }, propDecorators: { rule: [{
1048
+ type: Input,
1049
+ args: ['Rule']
1050
+ }], message: [{
1051
+ type: Input,
1052
+ args: ['message']
1053
+ }] } });
1054
+
1055
+ class AboveDirective {
1056
+ constructor(mb, el, utl) {
1057
+ this.mb = mb;
1058
+ this.el = el;
1059
+ this.utl = utl;
1060
+ this.vmessage = {};
1061
+ this.fieldName = 'field';
1062
+ this.above = 0;
1063
+ this.fieldName = this.el.nativeElement.name;
1064
+ }
1065
+ set message(data) {
1066
+ this.vmessage = data;
1067
+ }
1068
+ validate(control) {
1069
+ this.utl.setValidationRules(control, 'above');
1070
+ return this.isValid(control.value);
1071
+ }
1072
+ isValid(value) {
1073
+ if (!!value && !this.utl.above(value, this.above)) {
1074
+ return { 'above': this.mb.call('above', this.fieldName, this.above, this.vmessage) };
1075
+ }
1076
+ return null;
1077
+ }
1078
+ }
1079
+ AboveDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AboveDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1080
+ AboveDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AboveDirective, selector: "[above]", inputs: { above: "above", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AboveDirective, multi: true }], ngImport: i0 });
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AboveDirective, decorators: [{
1082
+ type: Directive,
1083
+ args: [{
1084
+ selector: '[above]',
1085
+ providers: [{ provide: NG_VALIDATORS, useExisting: AboveDirective, multi: true }]
1086
+ }]
1087
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { above: [{
1088
+ type: Input,
1089
+ args: ['above']
1090
+ }], message: [{
1091
+ type: Input,
1092
+ args: ['message']
1093
+ }] } });
1094
+
1095
+ class AcceptedDirective {
1096
+ constructor(mb, el, utl) {
1097
+ this.mb = mb;
1098
+ this.el = el;
1099
+ this.utl = utl;
1100
+ this.vmessage = {};
1101
+ this.fieldName = 'field';
1102
+ this.fieldName = this.el.nativeElement.name;
1103
+ }
1104
+ set message(data) {
1105
+ this.vmessage = data;
1106
+ }
1107
+ validate(control) {
1108
+ this.utl.setValidationRules(control, 'accepted');
1109
+ return this.isValid(control.value);
1110
+ }
1111
+ isValid(value) {
1112
+ if (!!value && !this.utl.accepted(value)) {
1113
+ return { 'accepted': this.mb.call('accepted', this.fieldName, this.vmessage) };
1114
+ }
1115
+ return null;
1116
+ }
1117
+ }
1118
+ AcceptedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AcceptedDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1119
+ AcceptedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AcceptedDirective, selector: "[accepted]", inputs: { accepted: "accepted", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AcceptedDirective, multi: true }], ngImport: i0 });
1120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AcceptedDirective, decorators: [{
1121
+ type: Directive,
1122
+ args: [{
1123
+ selector: '[accepted]',
1124
+ providers: [{ provide: NG_VALIDATORS, useExisting: AcceptedDirective, multi: true }]
1125
+ }]
1126
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { accepted: [{
1127
+ type: Input,
1128
+ args: ['accepted']
1129
+ }], message: [{
1130
+ type: Input,
1131
+ args: ['message']
1132
+ }] } });
1133
+
1134
+ class AfterDirective {
1135
+ constructor(mb, el, utl) {
1136
+ this.mb = mb;
1137
+ this.el = el;
1138
+ this.utl = utl;
1139
+ this.vmessage = {};
1140
+ this.fieldName = 'field';
1141
+ this.after = [];
1142
+ this.fieldName = this.el.nativeElement.name;
1143
+ }
1144
+ set message(data) {
1145
+ this.vmessage = data;
1146
+ }
1147
+ validate(control) {
1148
+ this.utl.setValidationRules(control, 'after');
1149
+ return this.isValid(control.value);
1150
+ }
1151
+ isValid(value) {
1152
+ let [matchWithDate, matchWithDateFormat] = Array.isArray(this.after) ? this.after : this.after.split(',');
1153
+ if (!!value && !this.utl.after(value, this.after)) {
1154
+ return { 'after': this.mb.call('after', this.fieldName, matchWithDate, this.vmessage) };
1155
+ }
1156
+ return null;
1157
+ }
1158
+ }
1159
+ AfterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AfterDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1160
+ AfterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AfterDirective, selector: "[after]", inputs: { after: "after", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AfterDirective, multi: true }], ngImport: i0 });
1161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AfterDirective, decorators: [{
1162
+ type: Directive,
1163
+ args: [{
1164
+ selector: '[after]',
1165
+ providers: [{ provide: NG_VALIDATORS, useExisting: AfterDirective, multi: true }]
1166
+ }]
1167
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { after: [{
1168
+ type: Input,
1169
+ args: ['after']
1170
+ }], message: [{
1171
+ type: Input,
1172
+ args: ['message']
1173
+ }] } });
1174
+
1175
+ class AlphaDirective {
1176
+ constructor(mb, el, utl) {
1177
+ this.mb = mb;
1178
+ this.el = el;
1179
+ this.utl = utl;
1180
+ this.vmessage = {};
1181
+ this.fieldName = 'field';
1182
+ this.fieldName = this.el.nativeElement.name;
1183
+ }
1184
+ set message(data) {
1185
+ this.vmessage = data;
1186
+ }
1187
+ validate(control) {
1188
+ this.utl.setValidationRules(control, 'alpha');
1189
+ return this.isValid(control.value);
1190
+ }
1191
+ isValid(value) {
1192
+ if (!!value && !this.utl.alpha(value)) {
1193
+ return { 'alpha': this.mb.call('alpha', this.fieldName, this.vmessage) };
1194
+ }
1195
+ return null;
1196
+ }
1197
+ }
1198
+ AlphaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1199
+ AlphaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AlphaDirective, selector: "[alpha]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AlphaDirective, multi: true }], ngImport: i0 });
1200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaDirective, decorators: [{
1201
+ type: Directive,
1202
+ args: [{
1203
+ selector: '[alpha]',
1204
+ providers: [{ provide: NG_VALIDATORS, useExisting: AlphaDirective, multi: true }]
1205
+ }]
1206
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1207
+ type: Input,
1208
+ args: ['message']
1209
+ }] } });
1210
+
1211
+ class AlphaNumericDirective {
1212
+ constructor(mb, el, utl) {
1213
+ this.mb = mb;
1214
+ this.el = el;
1215
+ this.utl = utl;
1216
+ this.vmessage = {};
1217
+ this.fieldName = 'field';
1218
+ this.fieldName = this.el.nativeElement.name;
1219
+ }
1220
+ set message(data) {
1221
+ this.vmessage = data;
1222
+ }
1223
+ validate(control) {
1224
+ this.utl.setValidationRules(control, 'alpha_numeric');
1225
+ return this.isValid(control.value);
1226
+ }
1227
+ isValid(value) {
1228
+ if (!!value && !this.utl.alphaNumeric(value)) {
1229
+ return { 'alpha_numeric': this.mb.call('alpha_numeric', this.fieldName, this.vmessage) };
1230
+ }
1231
+ return null;
1232
+ }
1233
+ }
1234
+ AlphaNumericDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaNumericDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1235
+ AlphaNumericDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AlphaNumericDirective, selector: "[alphaNumeric]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AlphaNumericDirective, multi: true }], ngImport: i0 });
1236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaNumericDirective, decorators: [{
1237
+ type: Directive,
1238
+ args: [{
1239
+ selector: '[alphaNumeric]',
1240
+ providers: [{ provide: NG_VALIDATORS, useExisting: AlphaNumericDirective, multi: true }]
1241
+ }]
1242
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1243
+ type: Input,
1244
+ args: ['message']
1245
+ }] } });
1246
+
1247
+ class ArrayDirective {
1248
+ constructor(mb, el, utl) {
1249
+ this.mb = mb;
1250
+ this.el = el;
1251
+ this.utl = utl;
1252
+ this.vmessage = {};
1253
+ this.fieldName = 'field';
1254
+ this.fieldName = this.el.nativeElement.name;
1255
+ }
1256
+ set message(data) {
1257
+ this.vmessage = data;
1258
+ }
1259
+ validate(control) {
1260
+ this.utl.setValidationRules(control, 'array');
1261
+ return this.isValid(control.value);
1262
+ }
1263
+ isValid(value) {
1264
+ if (!!value && !this.utl.array(value)) {
1265
+ return { 'array': this.mb.call('array', this.fieldName, this.vmessage) };
1266
+ }
1267
+ return null;
1268
+ }
1269
+ }
1270
+ ArrayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ArrayDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1271
+ ArrayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ArrayDirective, selector: "[array]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: ArrayDirective, multi: true }], ngImport: i0 });
1272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ArrayDirective, decorators: [{
1273
+ type: Directive,
1274
+ args: [{
1275
+ selector: '[array]',
1276
+ providers: [{ provide: NG_VALIDATORS, useExisting: ArrayDirective, multi: true }]
1277
+ }]
1278
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1279
+ type: Input,
1280
+ args: ['message']
1281
+ }] } });
1282
+
1283
+ class BeforeDirective {
1284
+ constructor(mb, el, utl) {
1285
+ this.mb = mb;
1286
+ this.el = el;
1287
+ this.utl = utl;
1288
+ this.vmessage = {};
1289
+ this.fieldName = 'field';
1290
+ this.before = [];
1291
+ this.fieldName = this.el.nativeElement.name;
1292
+ }
1293
+ set message(data) {
1294
+ this.vmessage = data;
1295
+ }
1296
+ validate(control) {
1297
+ this.utl.setValidationRules(control, 'before');
1298
+ return this.isValid(control.value);
1299
+ }
1300
+ isValid(value) {
1301
+ let [matchWithDate, matchWithDateFormat] = Array.isArray(this.before) ? this.before : this.before.split(',');
1302
+ if (!!value && !this.utl.before(value, this.before)) {
1303
+ return { 'before': this.mb.call('before', this.fieldName, matchWithDate, this.vmessage) };
1304
+ }
1305
+ return null;
1306
+ }
1307
+ }
1308
+ BeforeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BeforeDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1309
+ BeforeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: BeforeDirective, selector: "[before]", inputs: { before: "before", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: BeforeDirective, multi: true }], ngImport: i0 });
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BeforeDirective, decorators: [{
1311
+ type: Directive,
1312
+ args: [{
1313
+ selector: '[before]',
1314
+ providers: [{ provide: NG_VALIDATORS, useExisting: BeforeDirective, multi: true }]
1315
+ }]
1316
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { before: [{
1317
+ type: Input,
1318
+ args: ['before']
1319
+ }], message: [{
1320
+ type: Input,
1321
+ args: ['message']
1322
+ }] } });
1323
+
1324
+ class BooleanDirective {
1325
+ constructor(mb, el, utl) {
1326
+ this.mb = mb;
1327
+ this.el = el;
1328
+ this.utl = utl;
1329
+ this.vmessage = {};
1330
+ this.fieldName = 'field';
1331
+ this.fieldName = this.el.nativeElement.name;
1332
+ }
1333
+ set message(data) {
1334
+ this.vmessage = data;
1335
+ }
1336
+ validate(control) {
1337
+ this.utl.setValidationRules(control, 'boolean');
1338
+ return this.isValid(control.value);
1339
+ }
1340
+ isValid(value) {
1341
+ if (!!value && !this.utl.boolean(value)) {
1342
+ return { 'boolean': this.mb.call('boolean', this.fieldName, this.vmessage) };
1343
+ }
1344
+ return null;
1345
+ }
1346
+ }
1347
+ BooleanDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BooleanDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1348
+ BooleanDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: BooleanDirective, selector: "[boolean]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: BooleanDirective, multi: true }], ngImport: i0 });
1349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BooleanDirective, decorators: [{
1350
+ type: Directive,
1351
+ args: [{
1352
+ selector: '[boolean]',
1353
+ providers: [{ provide: NG_VALIDATORS, useExisting: BooleanDirective, multi: true }]
1354
+ }]
1355
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1356
+ type: Input,
1357
+ args: ['message']
1358
+ }] } });
1359
+
1360
+ class ConfirmedDirective {
1361
+ constructor(mb, el, utl) {
1362
+ this.mb = mb;
1363
+ this.el = el;
1364
+ this.utl = utl;
1365
+ this.vmessage = {};
1366
+ this.destroy$ = new Subject();
1367
+ this.wired = false;
1368
+ this.fieldName = 'field';
1369
+ this.confirmed = '';
1370
+ this.fieldName = this.el.nativeElement.name;
1371
+ }
1372
+ set message(data) {
1373
+ this.vmessage = data;
1374
+ }
1375
+ validate(control) {
1376
+ this.utl.setValidationRules(control, 'confirmed');
1377
+ this.wireSiblingWatchers(control);
1378
+ return this.isValid(control, this.confirmed, this.fieldName);
1379
+ }
1380
+ isValid(control, args, fieldName) {
1381
+ if (!!control.value && !this.utl.confirmed(control, args, fieldName)) {
1382
+ return { 'confirmed': this.mb.call('confirmed', this.fieldName, this.vmessage) };
1383
+ }
1384
+ return null;
1385
+ }
1386
+ wireSiblingWatchers(control) {
1387
+ if (this.wired)
1388
+ return;
1389
+ let ctrlName = this.confirmed || (`${this.fieldName}_confirmation`);
1390
+ let sibling = control.root.get(ctrlName);
1391
+ if (!sibling)
1392
+ return;
1393
+ this.wired = true;
1394
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
1395
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
1396
+ }
1397
+ ngOnDestroy() {
1398
+ this.destroy$.next();
1399
+ this.destroy$.complete();
1400
+ }
1401
+ }
1402
+ ConfirmedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmedDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1403
+ ConfirmedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmedDirective, selector: "[confirmed]", inputs: { confirmed: "confirmed", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: ConfirmedDirective, multi: true }], ngImport: i0 });
1404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmedDirective, decorators: [{
1405
+ type: Directive,
1406
+ args: [{
1407
+ selector: '[confirmed]',
1408
+ providers: [{ provide: NG_VALIDATORS, useExisting: ConfirmedDirective, multi: true }]
1409
+ }]
1410
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { confirmed: [{
1411
+ type: Input,
1412
+ args: ['confirmed']
1413
+ }], message: [{
1414
+ type: Input,
1415
+ args: ['message']
1416
+ }] } });
1417
+
1418
+ class DateDirective {
1419
+ constructor(mb, el, utl) {
1420
+ this.mb = mb;
1421
+ this.el = el;
1422
+ this.utl = utl;
1423
+ this.vmessage = {};
1424
+ this.fieldName = 'field';
1425
+ this.date = '';
1426
+ this.fieldName = this.el.nativeElement.name;
1427
+ }
1428
+ set message(data) {
1429
+ this.vmessage = data;
1430
+ }
1431
+ validate(control) {
1432
+ this.utl.setValidationRules(control, 'date');
1433
+ return this.isValid(control.value, this.date || DEFAULT_DATE_FORMAT);
1434
+ }
1435
+ isValid(value, format) {
1436
+ if (!!value && !this.utl.date(value, format)) {
1437
+ return { 'date': this.mb.call('date', this.fieldName, this.vmessage) };
1438
+ }
1439
+ return null;
1440
+ }
1441
+ }
1442
+ DateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1443
+ DateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DateDirective, selector: "[date]", inputs: { date: "date", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: DateDirective, multi: true }], ngImport: i0 });
1444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateDirective, decorators: [{
1445
+ type: Directive,
1446
+ args: [{
1447
+ selector: '[date]',
1448
+ providers: [{ provide: NG_VALIDATORS, useExisting: DateDirective, multi: true }]
1449
+ }]
1450
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { date: [{
1451
+ type: Input,
1452
+ args: ['date']
1453
+ }], message: [{
1454
+ type: Input,
1455
+ args: ['message']
1456
+ }] } });
1457
+
1458
+ class DateFormatDirective {
1459
+ constructor(mb, el, utl) {
1460
+ this.mb = mb;
1461
+ this.el = el;
1462
+ this.utl = utl;
1463
+ this.vmessage = {};
1464
+ this.fieldName = 'field';
1465
+ this.dateFormat = '';
1466
+ this.fieldName = this.el.nativeElement.name;
1467
+ }
1468
+ set message(data) {
1469
+ this.vmessage = data;
1470
+ }
1471
+ validate(control) {
1472
+ this.utl.setValidationRules(control, 'date_format');
1473
+ return this.isValid(control.value, this.dateFormat || DEFAULT_DATE_FORMAT);
1474
+ }
1475
+ isValid(value, format) {
1476
+ if (!!value && !this.utl.dateFormat(value, format)) {
1477
+ return { 'date_format': this.mb.call('date_format', this.fieldName, this.dateFormat, this.vmessage) };
1478
+ }
1479
+ return null;
1480
+ }
1481
+ }
1482
+ DateFormatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateFormatDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1483
+ DateFormatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DateFormatDirective, selector: "[dateFormat]", inputs: { dateFormat: "dateFormat", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: DateFormatDirective, multi: true }], ngImport: i0 });
1484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateFormatDirective, decorators: [{
1485
+ type: Directive,
1486
+ args: [{
1487
+ selector: '[dateFormat]',
1488
+ providers: [{ provide: NG_VALIDATORS, useExisting: DateFormatDirective, multi: true }]
1489
+ }]
1490
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { dateFormat: [{
1491
+ type: Input,
1492
+ args: ['dateFormat']
1493
+ }], message: [{
1494
+ type: Input,
1495
+ args: ['message']
1496
+ }] } });
1497
+
1498
+ class DifferentDirective {
1499
+ constructor(mb, el, utl) {
1500
+ this.mb = mb;
1501
+ this.el = el;
1502
+ this.utl = utl;
1503
+ this.vmessage = {};
1504
+ this.destroy$ = new Subject();
1505
+ this.wired = false;
1506
+ this.fieldName = 'field';
1507
+ this.fieldName = this.el.nativeElement.name;
1508
+ }
1509
+ set message(data) {
1510
+ this.vmessage = data;
1511
+ }
1512
+ validate(control) {
1513
+ this.utl.setValidationRules(control, 'different');
1514
+ this.wireSiblingWatchers(control);
1515
+ return this.isValid(control, this.different);
1516
+ }
1517
+ isValid(control, compared_value) {
1518
+ if (!!control.value && !this.utl.different(control, compared_value)) {
1519
+ return { 'different': this.mb.call('different', this.fieldName, this.different, this.vmessage) };
1520
+ }
1521
+ return null;
1522
+ }
1523
+ wireSiblingWatchers(control) {
1524
+ if (this.wired)
1525
+ return;
1526
+ let sibling = control.root.get(this.different);
1527
+ if (!sibling)
1528
+ return;
1529
+ this.wired = true;
1530
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$)).subscribe(() => {
1531
+ control.updateValueAndValidity({ onlySelf: true });
1532
+ });
1533
+ }
1534
+ ngOnDestroy() {
1535
+ this.destroy$.next();
1536
+ this.destroy$.complete();
1537
+ }
1538
+ }
1539
+ DifferentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DifferentDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1540
+ DifferentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DifferentDirective, selector: "[different]", inputs: { different: "different", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: DifferentDirective, multi: true }], ngImport: i0 });
1541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DifferentDirective, decorators: [{
1542
+ type: Directive,
1543
+ args: [{
1544
+ selector: '[different]',
1545
+ providers: [{ provide: NG_VALIDATORS, useExisting: DifferentDirective, multi: true }]
1546
+ }]
1547
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { different: [{
1548
+ type: Input,
1549
+ args: ['different']
1550
+ }], message: [{
1551
+ type: Input,
1552
+ args: ['message']
1553
+ }] } });
1554
+
1555
+ class EmailDirective {
1556
+ constructor(mb, el, utl) {
1557
+ this.mb = mb;
1558
+ this.el = el;
1559
+ this.utl = utl;
1560
+ this.vmessage = {};
1561
+ this.fieldName = 'field';
1562
+ this.fieldName = this.el.nativeElement.name;
1563
+ }
1564
+ set message(data) {
1565
+ this.vmessage = data;
1566
+ }
1567
+ validate(control) {
1568
+ this.utl.setValidationRules(control, 'email');
1569
+ return this.isValid(control.value);
1570
+ }
1571
+ isValid(value) {
1572
+ if (!!value && !this.utl.email(value)) {
1573
+ return { 'email': this.mb.call('email', this.fieldName, this.vmessage) };
1574
+ }
1575
+ return null;
1576
+ }
1577
+ }
1578
+ EmailDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EmailDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1579
+ EmailDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EmailDirective, selector: "[email]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: EmailDirective, multi: true }], ngImport: i0 });
1580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EmailDirective, decorators: [{
1581
+ type: Directive,
1582
+ args: [{
1583
+ selector: '[email]',
1584
+ providers: [{ provide: NG_VALIDATORS, useExisting: EmailDirective, multi: true }]
1585
+ }]
1586
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1587
+ type: Input,
1588
+ args: ['message']
1589
+ }] } });
1590
+
1591
+ class EndsWithDirective {
1592
+ constructor(mb, el, utl) {
1593
+ this.mb = mb;
1594
+ this.el = el;
1595
+ this.utl = utl;
1596
+ this.vmessage = {};
1597
+ this.fieldName = 'field';
1598
+ this.endsWith = [];
1599
+ this.fieldName = this.el.nativeElement.name;
1600
+ }
1601
+ set message(data) {
1602
+ this.vmessage = data;
1603
+ }
1604
+ validate(control) {
1605
+ this.utl.setValidationRules(control, 'ends_with');
1606
+ return this.isValid(control.value);
1607
+ }
1608
+ isValid(value) {
1609
+ if (!!value && !this.utl.endsWith(value, this.endsWith)) {
1610
+ return { 'ends_with': this.mb.call('ends_with', this.fieldName, this.endsWith, this.vmessage) };
1611
+ }
1612
+ return null;
1613
+ }
1614
+ }
1615
+ EndsWithDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EndsWithDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1616
+ EndsWithDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EndsWithDirective, selector: "[endsWith]", inputs: { endsWith: "endsWith", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: EndsWithDirective, multi: true }], ngImport: i0 });
1617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EndsWithDirective, decorators: [{
1618
+ type: Directive,
1619
+ args: [{
1620
+ selector: '[endsWith]',
1621
+ providers: [{ provide: NG_VALIDATORS, useExisting: EndsWithDirective, multi: true }]
1622
+ }]
1623
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { endsWith: [{
1624
+ type: Input,
1625
+ args: ['endsWith']
1626
+ }], message: [{
1627
+ type: Input,
1628
+ args: ['message']
1629
+ }] } });
1630
+
1631
+ class EqualsDirective {
1632
+ constructor(mb, el, utl) {
1633
+ this.mb = mb;
1634
+ this.el = el;
1635
+ this.utl = utl;
1636
+ this.vmessage = {};
1637
+ this.fieldName = 'field';
1638
+ this.equals = '';
1639
+ this.fieldName = this.el.nativeElement.name;
1640
+ }
1641
+ set message(data) {
1642
+ this.vmessage = data;
1643
+ }
1644
+ validate(control) {
1645
+ this.utl.setValidationRules(control, 'equals');
1646
+ return this.isValid(control.value);
1647
+ }
1648
+ isValid(value) {
1649
+ if (!!value && !this.utl.equals(value, this.equals)) {
1650
+ return { 'equals': this.mb.call('equals', this.fieldName, this.equals, this.vmessage) };
1651
+ }
1652
+ return null;
1653
+ }
1654
+ }
1655
+ EqualsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EqualsDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1656
+ EqualsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EqualsDirective, selector: "[equals]", inputs: { equals: "equals", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: EqualsDirective, multi: true }], ngImport: i0 });
1657
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EqualsDirective, decorators: [{
1658
+ type: Directive,
1659
+ args: [{
1660
+ selector: '[equals]',
1661
+ providers: [{ provide: NG_VALIDATORS, useExisting: EqualsDirective, multi: true }]
1662
+ }]
1663
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { equals: [{
1664
+ type: Input,
1665
+ args: ['equals']
1666
+ }], message: [{
1667
+ type: Input,
1668
+ args: ['message']
1669
+ }] } });
1670
+
1671
+ class InDirective {
1672
+ constructor(mb, el, utl) {
1673
+ this.mb = mb;
1674
+ this.el = el;
1675
+ this.utl = utl;
1676
+ this.vmessage = {};
1677
+ this.fieldName = 'field';
1678
+ this.in = [];
1679
+ this.fieldName = this.el.nativeElement.name;
1680
+ }
1681
+ set message(data) {
1682
+ this.vmessage = data;
1683
+ }
1684
+ validate(control) {
1685
+ this.utl.setValidationRules(control, 'in');
1686
+ return this.isValid(control.value);
1687
+ }
1688
+ isValid(value) {
1689
+ if (!!value && !this.utl.in(value, this.in)) {
1690
+ return { 'in': this.mb.call('in', this.fieldName, this.in, this.vmessage) };
1691
+ }
1692
+ return null;
1693
+ }
1694
+ }
1695
+ InDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1696
+ InDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: InDirective, selector: "[in]", inputs: { in: "in", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: InDirective, multi: true }], ngImport: i0 });
1697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InDirective, decorators: [{
1698
+ type: Directive,
1699
+ args: [{
1700
+ selector: '[in]',
1701
+ providers: [{ provide: NG_VALIDATORS, useExisting: InDirective, multi: true }]
1702
+ }]
1703
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { in: [{
1704
+ type: Input,
1705
+ args: ['in']
1706
+ }], message: [{
1707
+ type: Input,
1708
+ args: ['message']
1709
+ }] } });
1710
+
1711
+ class IncludesDirective {
1712
+ constructor(mb, el, utl) {
1713
+ this.mb = mb;
1714
+ this.el = el;
1715
+ this.utl = utl;
1716
+ this.vmessage = {};
1717
+ this.fieldName = 'field';
1718
+ this.includes = [];
1719
+ this.fieldName = this.el.nativeElement.name;
1720
+ }
1721
+ set message(data) {
1722
+ this.vmessage = data;
1723
+ }
1724
+ validate(control) {
1725
+ this.utl.setValidationRules(control, 'includes');
1726
+ return this.isValid(control.value);
1727
+ }
1728
+ isValid(value) {
1729
+ if (!!value && !this.utl.includes(value, this.includes)) {
1730
+ return { 'includes': this.mb.call('includes', this.fieldName, this.includes, this.vmessage) };
1731
+ }
1732
+ return null;
1733
+ }
1734
+ }
1735
+ IncludesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IncludesDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1736
+ IncludesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: IncludesDirective, selector: "[includes]", inputs: { includes: "includes", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: IncludesDirective, multi: true }], ngImport: i0 });
1737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IncludesDirective, decorators: [{
1738
+ type: Directive,
1739
+ args: [{
1740
+ selector: '[includes]',
1741
+ providers: [{ provide: NG_VALIDATORS, useExisting: IncludesDirective, multi: true }]
1742
+ }]
1743
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { includes: [{
1744
+ type: Input,
1745
+ args: ['includes']
1746
+ }], message: [{
1747
+ type: Input,
1748
+ args: ['message']
1749
+ }] } });
1750
+
1751
+ class IntegerDirective {
1752
+ constructor(mb, el, utl) {
1753
+ this.mb = mb;
1754
+ this.el = el;
1755
+ this.utl = utl;
1756
+ this.vmessage = {};
1757
+ this.fieldName = 'field';
1758
+ this.fieldName = this.el.nativeElement.name;
1759
+ }
1760
+ set message(data) {
1761
+ this.vmessage = data;
1762
+ }
1763
+ validate(control) {
1764
+ this.utl.setValidationRules(control, 'integer');
1765
+ return this.isValid(control.value);
1766
+ }
1767
+ isValid(value) {
1768
+ if (!!value && !this.utl.integer(value)) {
1769
+ return { 'integer': this.mb.call('integer', this.fieldName, this.vmessage) };
1770
+ }
1771
+ return null;
1772
+ }
1773
+ }
1774
+ IntegerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IntegerDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1775
+ IntegerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: IntegerDirective, selector: "[integer]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: IntegerDirective, multi: true }], ngImport: i0 });
1776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IntegerDirective, decorators: [{
1777
+ type: Directive,
1778
+ args: [{
1779
+ selector: '[integer]',
1780
+ providers: [{ provide: NG_VALIDATORS, useExisting: IntegerDirective, multi: true }]
1781
+ }]
1782
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1783
+ type: Input,
1784
+ args: ['message']
1785
+ }] } });
1786
+
1787
+ class IpDirective {
1788
+ constructor(mb, el, utl) {
1789
+ this.mb = mb;
1790
+ this.el = el;
1791
+ this.utl = utl;
1792
+ this.vmessage = {};
1793
+ this.fieldName = 'field';
1794
+ this.fieldName = this.el.nativeElement.name;
1795
+ }
1796
+ set message(data) {
1797
+ this.vmessage = data;
1798
+ }
1799
+ validate(control) {
1800
+ this.utl.setValidationRules(control, 'ip');
1801
+ return this.isValid(control.value);
1802
+ }
1803
+ isValid(value) {
1804
+ if (!!value && !this.utl.ip(value)) {
1805
+ return { 'ip': this.mb.call('ip', this.fieldName, this.vmessage) };
1806
+ }
1807
+ return null;
1808
+ }
1809
+ }
1810
+ IpDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IpDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1811
+ IpDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: IpDirective, selector: "[ip]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: IpDirective, multi: true }], ngImport: i0 });
1812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: IpDirective, decorators: [{
1813
+ type: Directive,
1814
+ args: [{
1815
+ selector: '[ip]',
1816
+ providers: [{ provide: NG_VALIDATORS, useExisting: IpDirective, multi: true }]
1817
+ }]
1818
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1819
+ type: Input,
1820
+ args: ['message']
1821
+ }] } });
1822
+
1823
+ class Ipv4Directive {
1824
+ constructor(mb, el, utl) {
1825
+ this.mb = mb;
1826
+ this.el = el;
1827
+ this.utl = utl;
1828
+ this.vmessage = {};
1829
+ this.fieldName = 'field';
1830
+ this.fieldName = this.el.nativeElement.name;
1831
+ }
1832
+ set message(data) {
1833
+ this.vmessage = data;
1834
+ }
1835
+ validate(control) {
1836
+ this.utl.setValidationRules(control, 'ipv4');
1837
+ return this.isValid(control.value);
1838
+ }
1839
+ isValid(value) {
1840
+ if (!!value && !this.utl.ipv4(value)) {
1841
+ return { 'ipv4': this.mb.call('ipv4', this.fieldName, this.vmessage) };
1842
+ }
1843
+ return null;
1844
+ }
1845
+ }
1846
+ Ipv4Directive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Ipv4Directive, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1847
+ Ipv4Directive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: Ipv4Directive, selector: "[ipv4]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: Ipv4Directive, multi: true }], ngImport: i0 });
1848
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Ipv4Directive, decorators: [{
1849
+ type: Directive,
1850
+ args: [{
1851
+ selector: '[ipv4]',
1852
+ providers: [{ provide: NG_VALIDATORS, useExisting: Ipv4Directive, multi: true }]
1853
+ }]
1854
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1855
+ type: Input,
1856
+ args: ['message']
1857
+ }] } });
1858
+
1859
+ class Ipv6Directive {
1860
+ constructor(mb, el, utl) {
1861
+ this.mb = mb;
1862
+ this.el = el;
1863
+ this.utl = utl;
1864
+ this.vmessage = {};
1865
+ this.fieldName = 'field';
1866
+ this.fieldName = this.el.nativeElement.name;
1867
+ }
1868
+ set message(data) {
1869
+ this.vmessage = data;
1870
+ }
1871
+ validate(control) {
1872
+ this.utl.setValidationRules(control, 'ipv6');
1873
+ return this.isValid(control.value);
1874
+ }
1875
+ isValid(value) {
1876
+ if (!this.utl.ipv6(value) && !!value) {
1877
+ return { 'ipv6': this.mb.call('ipv6', this.fieldName, this.vmessage) };
1878
+ }
1879
+ return null;
1880
+ }
1881
+ }
1882
+ Ipv6Directive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Ipv6Directive, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1883
+ Ipv6Directive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: Ipv6Directive, selector: "[ipv6]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: Ipv6Directive, multi: true }], ngImport: i0 });
1884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Ipv6Directive, decorators: [{
1885
+ type: Directive,
1886
+ args: [{
1887
+ selector: '[ipv6]',
1888
+ providers: [{ provide: NG_VALIDATORS, useExisting: Ipv6Directive, multi: true }]
1889
+ }]
1890
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1891
+ type: Input,
1892
+ args: ['message']
1893
+ }] } });
1894
+
1895
+ class JsonDirective {
1896
+ constructor(mb, el, utl) {
1897
+ this.mb = mb;
1898
+ this.el = el;
1899
+ this.utl = utl;
1900
+ this.vmessage = {};
1901
+ this.fieldName = 'field';
1902
+ this.fieldName = this.el.nativeElement.name;
1903
+ }
1904
+ set message(data) {
1905
+ this.vmessage = data;
1906
+ }
1907
+ validate(control) {
1908
+ this.utl.setValidationRules(control, 'json');
1909
+ return this.isValid(control.value);
1910
+ }
1911
+ isValid(value) {
1912
+ if (!!value && !this.utl.json(value)) {
1913
+ return { 'json': this.mb.call('json', this.fieldName, this.vmessage) };
1914
+ }
1915
+ return null;
1916
+ }
1917
+ }
1918
+ JsonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JsonDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1919
+ JsonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: JsonDirective, selector: "[json]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: JsonDirective, multi: true }], ngImport: i0 });
1920
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JsonDirective, decorators: [{
1921
+ type: Directive,
1922
+ args: [{
1923
+ selector: '[json]',
1924
+ providers: [{ provide: NG_VALIDATORS, useExisting: JsonDirective, multi: true }]
1925
+ }]
1926
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
1927
+ type: Input,
1928
+ args: ['message']
1929
+ }] } });
1930
+
1931
+ class MaxDirective {
1932
+ constructor(mb, el, utl) {
1933
+ this.mb = mb;
1934
+ this.el = el;
1935
+ this.utl = utl;
1936
+ this.vmessage = {};
1937
+ this.fieldName = 'field';
1938
+ this.fieldName = this.el.nativeElement.name;
1939
+ }
1940
+ set message(data) {
1941
+ this.vmessage = data;
1942
+ }
1943
+ validate(control) {
1944
+ this.utl.setValidationRules(control, 'max');
1945
+ return this.isValid(control.value);
1946
+ }
1947
+ isValid(value) {
1948
+ let fnName = 'max.string';
1949
+ if (this.utl.integer(value)) {
1950
+ fnName = 'max.numeric';
1951
+ }
1952
+ if (this.utl.array(value)) {
1953
+ fnName = 'max.array';
1954
+ }
1955
+ if (!this.utl.max(value, this.max) && !!value) {
1956
+ return { 'max': this.mb.call(fnName, this.fieldName, this.max, this.vmessage) };
1957
+ }
1958
+ return null;
1959
+ }
1960
+ }
1961
+ MaxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MaxDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
1962
+ MaxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: MaxDirective, selector: "[max]", inputs: { max: "max", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: MaxDirective, multi: true }], ngImport: i0 });
1963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MaxDirective, decorators: [{
1964
+ type: Directive,
1965
+ args: [{
1966
+ selector: '[max]',
1967
+ providers: [{ provide: NG_VALIDATORS, useExisting: MaxDirective, multi: true }]
1968
+ }]
1969
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { max: [{
1970
+ type: Input,
1971
+ args: ['max']
1972
+ }], message: [{
1973
+ type: Input,
1974
+ args: ['message']
1975
+ }] } });
1976
+
1977
+ class MinDirective {
1978
+ constructor(mb, el, utl) {
1979
+ this.mb = mb;
1980
+ this.el = el;
1981
+ this.utl = utl;
1982
+ this.vmessage = {};
1983
+ this.fieldName = 'field';
1984
+ this.fieldName = this.el.nativeElement.name;
1985
+ }
1986
+ set message(data) {
1987
+ this.vmessage = data;
1988
+ }
1989
+ validate(control) {
1990
+ this.utl.setValidationRules(control, 'min');
1991
+ return this.isValid(control.value);
1992
+ }
1993
+ isValid(value) {
1994
+ let fnName = 'min.string';
1995
+ if (this.utl.integer(value)) {
1996
+ fnName = 'min.numeric';
1997
+ }
1998
+ if (this.utl.array(value)) {
1999
+ fnName = 'min.array';
2000
+ }
2001
+ if (!!value && !this.utl.min(value, this.min)) {
2002
+ return { 'min': this.mb.call(fnName, this.fieldName, this.min, this.vmessage) };
2003
+ }
2004
+ return null;
2005
+ }
2006
+ }
2007
+ MinDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MinDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2008
+ MinDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: MinDirective, selector: "[min]", inputs: { min: "min", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: MinDirective, multi: true }], ngImport: i0 });
2009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MinDirective, decorators: [{
2010
+ type: Directive,
2011
+ args: [{
2012
+ selector: '[min]',
2013
+ providers: [{ provide: NG_VALIDATORS, useExisting: MinDirective, multi: true }]
2014
+ }]
2015
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { min: [{
2016
+ type: Input,
2017
+ args: ['min']
2018
+ }], message: [{
2019
+ type: Input,
2020
+ args: ['message']
2021
+ }] } });
2022
+
2023
+ class NotEqualsDirective {
2024
+ constructor(mb, el, utl) {
2025
+ this.mb = mb;
2026
+ this.el = el;
2027
+ this.utl = utl;
2028
+ this.vmessage = {};
2029
+ this.fieldName = 'field';
2030
+ this.fieldName = this.el.nativeElement.name;
2031
+ }
2032
+ set message(data) {
2033
+ this.vmessage = data;
2034
+ }
2035
+ validate(control) {
2036
+ this.utl.setValidationRules(control, 'not_equals');
2037
+ return this.isValid(control.value);
2038
+ }
2039
+ isValid(value) {
2040
+ if (!!value && !this.utl.notEquals(value, this.notEquals)) {
2041
+ return { 'not_equals': this.mb.call('not_equals', this.fieldName, this.notEquals, this.vmessage) };
2042
+ }
2043
+ return null;
2044
+ }
2045
+ }
2046
+ NotEqualsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotEqualsDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2047
+ NotEqualsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NotEqualsDirective, selector: "[notEquals]", inputs: { notEquals: "notEquals", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: NotEqualsDirective, multi: true }], ngImport: i0 });
2048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotEqualsDirective, decorators: [{
2049
+ type: Directive,
2050
+ args: [{
2051
+ selector: '[notEquals]',
2052
+ providers: [{ provide: NG_VALIDATORS, useExisting: NotEqualsDirective, multi: true }]
2053
+ }]
2054
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { notEquals: [{
2055
+ type: Input,
2056
+ args: ['notEquals']
2057
+ }], message: [{
2058
+ type: Input,
2059
+ args: ['message']
2060
+ }] } });
2061
+
2062
+ class NotInDirective {
2063
+ constructor(mb, el, utl) {
2064
+ this.mb = mb;
2065
+ this.el = el;
2066
+ this.utl = utl;
2067
+ this.vmessage = {};
2068
+ this.fieldName = 'field';
2069
+ this.notIn = [];
2070
+ this.fieldName = this.el.nativeElement.name;
2071
+ }
2072
+ set message(data) {
2073
+ this.vmessage = data;
2074
+ }
2075
+ validate(control) {
2076
+ this.utl.setValidationRules(control, 'not_in');
2077
+ return this.isValid(control.value);
2078
+ }
2079
+ isValid(value) {
2080
+ if (!!value && !this.utl.notIn(value, this.notIn)) {
2081
+ return { 'not_in': this.mb.call('not_in', this.fieldName, this.notIn, this.vmessage) };
2082
+ }
2083
+ return null;
2084
+ }
2085
+ }
2086
+ NotInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotInDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2087
+ NotInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NotInDirective, selector: "[notIn]", inputs: { notIn: "notIn", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: NotInDirective, multi: true }], ngImport: i0 });
2088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotInDirective, decorators: [{
2089
+ type: Directive,
2090
+ args: [{
2091
+ selector: '[notIn]',
2092
+ providers: [{ provide: NG_VALIDATORS, useExisting: NotInDirective, multi: true }]
2093
+ }]
2094
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { notIn: [{
2095
+ type: Input,
2096
+ args: ['notIn']
2097
+ }], message: [{
2098
+ type: Input,
2099
+ args: ['message']
2100
+ }] } });
2101
+
2102
+ class NumberDirective {
2103
+ constructor(mb, el, utl) {
2104
+ this.mb = mb;
2105
+ this.el = el;
2106
+ this.utl = utl;
2107
+ this.vmessage = {};
2108
+ this.fieldName = 'field';
2109
+ this.fieldName = this.el.nativeElement.name;
2110
+ }
2111
+ set message(data) {
2112
+ this.vmessage = data;
2113
+ }
2114
+ validate(control) {
2115
+ this.utl.setValidationRules(control, 'number');
2116
+ return this.isValid(control.value);
2117
+ }
2118
+ isValid(value) {
2119
+ if (!!value && !this.utl.number(value)) {
2120
+ return { 'number': this.mb.call('number', this.fieldName, this.vmessage) };
2121
+ }
2122
+ return null;
2123
+ }
2124
+ }
2125
+ NumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2126
+ NumberDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NumberDirective, selector: "[number]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: NumberDirective, multi: true }], ngImport: i0 });
2127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NumberDirective, decorators: [{
2128
+ type: Directive,
2129
+ args: [{
2130
+ selector: '[number]',
2131
+ providers: [{ provide: NG_VALIDATORS, useExisting: NumberDirective, multi: true }]
2132
+ }]
2133
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2134
+ type: Input,
2135
+ args: ['message']
2136
+ }] } });
2137
+
2138
+ class RangeDirective {
2139
+ constructor(mb, el, utl) {
2140
+ this.mb = mb;
2141
+ this.el = el;
2142
+ this.utl = utl;
2143
+ this.vmessage = {};
2144
+ this.fieldName = 'field';
2145
+ this.range = [];
2146
+ this.fieldName = this.el.nativeElement.name;
2147
+ }
2148
+ set message(data) {
2149
+ this.vmessage = data;
2150
+ }
2151
+ validate(control) {
2152
+ this.utl.setValidationRules(control, 'range');
2153
+ return this.isValid(control.value);
2154
+ }
2155
+ isValid(value) {
2156
+ if (!this.utl.range(value, this.range) && !!value) {
2157
+ return { 'range': this.mb.call('range', this.fieldName, ...toArray(this.range), this.vmessage) };
2158
+ }
2159
+ return null;
2160
+ }
2161
+ }
2162
+ RangeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RangeDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2163
+ RangeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RangeDirective, selector: "[range]", inputs: { range: "range", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RangeDirective, multi: true }], ngImport: i0 });
2164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RangeDirective, decorators: [{
2165
+ type: Directive,
2166
+ args: [{
2167
+ selector: '[range]',
2168
+ providers: [{ provide: NG_VALIDATORS, useExisting: RangeDirective, multi: true }]
2169
+ }]
2170
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { range: [{
2171
+ type: Input,
2172
+ args: ['range']
2173
+ }], message: [{
2174
+ type: Input,
2175
+ args: ['message']
2176
+ }] } });
2177
+
2178
+ class BetweenDirective {
2179
+ constructor(mb, el, utl) {
2180
+ this.mb = mb;
2181
+ this.el = el;
2182
+ this.utl = utl;
2183
+ this.vmessage = {};
2184
+ this.fieldName = 'field';
2185
+ this.between = [];
2186
+ this.fieldName = this.el.nativeElement.name;
2187
+ }
2188
+ set message(data) {
2189
+ this.vmessage = data;
2190
+ }
2191
+ validate(control) {
2192
+ this.utl.setValidationRules(control, 'range');
2193
+ return this.isValid(control.value);
2194
+ }
2195
+ isValid(value) {
2196
+ if (!this.utl.between(value, this.between) && !!value) {
2197
+ return { 'between': this.mb.call('between', this.fieldName, ...toArray(this.between), this.vmessage) };
2198
+ }
2199
+ return null;
2200
+ }
2201
+ }
2202
+ BetweenDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BetweenDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2203
+ BetweenDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: BetweenDirective, selector: "[between]", inputs: { between: "between", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: BetweenDirective, multi: true }], ngImport: i0 });
2204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BetweenDirective, decorators: [{
2205
+ type: Directive,
2206
+ args: [{
2207
+ selector: '[between]',
2208
+ providers: [{ provide: NG_VALIDATORS, useExisting: BetweenDirective, multi: true }]
2209
+ }]
2210
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { between: [{
2211
+ type: Input,
2212
+ args: ['between']
2213
+ }], message: [{
2214
+ type: Input,
2215
+ args: ['message']
2216
+ }] } });
2217
+
2218
+ class RegexDirective {
2219
+ constructor(mb, el, utl) {
2220
+ this.mb = mb;
2221
+ this.el = el;
2222
+ this.utl = utl;
2223
+ this.vmessage = {};
2224
+ this.fieldName = 'field';
2225
+ this.regex = '';
2226
+ this.fieldName = this.el.nativeElement.name;
2227
+ }
2228
+ set message(data) {
2229
+ this.vmessage = data;
2230
+ }
2231
+ validate(control) {
2232
+ this.utl.setValidationRules(control, 'regex');
2233
+ return this.isValid(control.value);
2234
+ }
2235
+ isValid(value) {
2236
+ if (!!value && !this.utl.regex(value, this.regex)) {
2237
+ return { 'regex': this.mb.call('regex', this.fieldName, this.vmessage) };
2238
+ }
2239
+ return null;
2240
+ }
2241
+ }
2242
+ RegexDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RegexDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2243
+ RegexDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RegexDirective, selector: "[regex]", inputs: { regex: "regex", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RegexDirective, multi: true }], ngImport: i0 });
2244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RegexDirective, decorators: [{
2245
+ type: Directive,
2246
+ args: [{
2247
+ selector: '[regex]',
2248
+ providers: [{ provide: NG_VALIDATORS, useExisting: RegexDirective, multi: true }]
2249
+ }]
2250
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { regex: [{
2251
+ type: Input,
2252
+ args: ['regex']
2253
+ }], message: [{
2254
+ type: Input,
2255
+ args: ['message']
2256
+ }] } });
2257
+
2258
+ class SameDirective {
2259
+ constructor(mb, el, utl) {
2260
+ this.mb = mb;
2261
+ this.el = el;
2262
+ this.utl = utl;
2263
+ this.vmessage = {};
2264
+ this.destroy$ = new Subject();
2265
+ this.wired = false;
2266
+ this.fieldName = 'field';
2267
+ this.fieldName = this.el.nativeElement.name;
2268
+ }
2269
+ set message(data) {
2270
+ this.vmessage = data;
2271
+ }
2272
+ validate(control) {
2273
+ this.utl.setValidationRules(control, 'same');
2274
+ this.wireSiblingWatchers(control);
2275
+ return this.isValid(control, this.same);
2276
+ }
2277
+ isValid(control, args) {
2278
+ if (!this.utl.same(control, args) && !!control.value) {
2279
+ return { 'same': this.mb.call('same', this.fieldName, this.same, this.vmessage) };
2280
+ }
2281
+ return null;
2282
+ }
2283
+ wireSiblingWatchers(control) {
2284
+ if (this.wired)
2285
+ return;
2286
+ let sibling = control.root.get(this.same);
2287
+ if (!sibling)
2288
+ return;
2289
+ this.wired = true;
2290
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
2291
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
2292
+ }
2293
+ ngOnDestroy() {
2294
+ this.destroy$.next();
2295
+ this.destroy$.complete();
2296
+ }
2297
+ }
2298
+ SameDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SameDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2299
+ SameDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: SameDirective, selector: "[same]", inputs: { same: "same", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: SameDirective, multi: true }], ngImport: i0 });
2300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SameDirective, decorators: [{
2301
+ type: Directive,
2302
+ args: [{
2303
+ selector: '[same]',
2304
+ providers: [{ provide: NG_VALIDATORS, useExisting: SameDirective, multi: true }]
2305
+ }]
2306
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { same: [{
2307
+ type: Input,
2308
+ args: ['same']
2309
+ }], message: [{
2310
+ type: Input,
2311
+ args: ['message']
2312
+ }] } });
2313
+
2314
+ class StartsWithDirective {
2315
+ constructor(mb, el, utl) {
2316
+ this.mb = mb;
2317
+ this.el = el;
2318
+ this.utl = utl;
2319
+ this.vmessage = {};
2320
+ this.fieldName = 'field';
2321
+ this.startsWith = [];
2322
+ this.fieldName = this.el.nativeElement.name;
2323
+ }
2324
+ set message(data) {
2325
+ this.vmessage = data;
2326
+ }
2327
+ validate(control) {
2328
+ this.utl.setValidationRules(control, 'starts_with');
2329
+ return this.isValid(control.value);
2330
+ }
2331
+ isValid(value) {
2332
+ if (!!value && !this.utl.startsWith(value, this.startsWith)) {
2333
+ return { 'starts_with': this.mb.call('starts_with', this.fieldName, this.startsWith, this.vmessage) };
2334
+ }
2335
+ return null;
2336
+ }
2337
+ }
2338
+ StartsWithDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StartsWithDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2339
+ StartsWithDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: StartsWithDirective, selector: "[startsWith]", inputs: { startsWith: "startsWith", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: StartsWithDirective, multi: true }], ngImport: i0 });
2340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StartsWithDirective, decorators: [{
2341
+ type: Directive,
2342
+ args: [{
2343
+ selector: '[startsWith]',
2344
+ providers: [{ provide: NG_VALIDATORS, useExisting: StartsWithDirective, multi: true }]
2345
+ }]
2346
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { startsWith: [{
2347
+ type: Input,
2348
+ args: ['startsWith']
2349
+ }], message: [{
2350
+ type: Input,
2351
+ args: ['message']
2352
+ }] } });
2353
+
2354
+ class StringDirective {
2355
+ constructor(mb, el, utl) {
2356
+ this.mb = mb;
2357
+ this.el = el;
2358
+ this.utl = utl;
2359
+ this.vmessage = {};
2360
+ this.fieldName = 'field';
2361
+ this.fieldName = this.el.nativeElement.name;
2362
+ }
2363
+ set message(data) {
2364
+ this.vmessage = data;
2365
+ }
2366
+ validate(control) {
2367
+ this.utl.setValidationRules(control, 'string');
2368
+ return this.isValid(control.value);
2369
+ }
2370
+ isValid(value) {
2371
+ if (!this.utl.string(value) && !!value) {
2372
+ return { 'string': this.mb.call('string', this.fieldName, this.vmessage) };
2373
+ }
2374
+ return null;
2375
+ }
2376
+ }
2377
+ StringDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StringDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2378
+ StringDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: StringDirective, selector: "[string]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: StringDirective, multi: true }], ngImport: i0 });
2379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StringDirective, decorators: [{
2380
+ type: Directive,
2381
+ args: [{
2382
+ selector: '[string]',
2383
+ providers: [{ provide: NG_VALIDATORS, useExisting: StringDirective, multi: true }]
2384
+ }]
2385
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2386
+ type: Input,
2387
+ args: ['message']
2388
+ }] } });
2389
+
2390
+ class UnderDirective {
2391
+ constructor(mb, el, utl) {
2392
+ this.mb = mb;
2393
+ this.el = el;
2394
+ this.utl = utl;
2395
+ this.vmessage = {};
2396
+ this.fieldName = 'field';
2397
+ this.fieldName = this.el.nativeElement.name;
2398
+ }
2399
+ set message(data) {
2400
+ this.vmessage = data;
2401
+ }
2402
+ validate(control) {
2403
+ this.utl.setValidationRules(control, 'under');
2404
+ return this.isValid(control.value);
2405
+ }
2406
+ isValid(value) {
2407
+ if (!!value && !this.utl.under(value, this.under)) {
2408
+ return { 'under': this.mb.call('under', this.fieldName, this.under, this.vmessage) };
2409
+ }
2410
+ return null;
2411
+ }
2412
+ }
2413
+ UnderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UnderDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2414
+ UnderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: UnderDirective, selector: "[under]", inputs: { under: "under", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: UnderDirective, multi: true }], ngImport: i0 });
2415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UnderDirective, decorators: [{
2416
+ type: Directive,
2417
+ args: [{
2418
+ selector: '[under]',
2419
+ providers: [{ provide: NG_VALIDATORS, useExisting: UnderDirective, multi: true }]
2420
+ }]
2421
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { under: [{
2422
+ type: Input,
2423
+ args: ['under']
2424
+ }], message: [{
2425
+ type: Input,
2426
+ args: ['message']
2427
+ }] } });
2428
+
2429
+ class UrlDirective {
2430
+ constructor(mb, el, utl) {
2431
+ this.mb = mb;
2432
+ this.el = el;
2433
+ this.utl = utl;
2434
+ this.vmessage = {};
2435
+ this.fieldName = 'field';
2436
+ this.fieldName = this.el.nativeElement.name;
2437
+ }
2438
+ set message(data) {
2439
+ this.vmessage = data;
2440
+ }
2441
+ validate(control) {
2442
+ this.utl.setValidationRules(control, 'url');
2443
+ return this.isValid(control.value);
2444
+ }
2445
+ isValid(value) {
2446
+ if (!!value && !this.utl.url(value)) {
2447
+ return { 'url': this.mb.call('url', this.fieldName, this.vmessage) };
2448
+ }
2449
+ return null;
2450
+ }
2451
+ }
2452
+ UrlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UrlDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2453
+ UrlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: UrlDirective, selector: "[url]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: UrlDirective, multi: true }], ngImport: i0 });
2454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UrlDirective, decorators: [{
2455
+ type: Directive,
2456
+ args: [{
2457
+ selector: '[url]',
2458
+ providers: [{ provide: NG_VALIDATORS, useExisting: UrlDirective, multi: true }]
2459
+ }]
2460
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2461
+ type: Input,
2462
+ args: ['message']
2463
+ }] } });
2464
+
2465
+ class AlphaDashDirective {
2466
+ constructor(mb, el, utl) {
2467
+ this.mb = mb;
2468
+ this.el = el;
2469
+ this.utl = utl;
2470
+ this.vmessage = {};
2471
+ this.fieldName = 'field';
2472
+ this.fieldName = this.el.nativeElement.name;
2473
+ }
2474
+ set message(data) {
2475
+ this.vmessage = data;
2476
+ }
2477
+ validate(control) {
2478
+ this.utl.setValidationRules(control, 'alpha_dash');
2479
+ return this.isValid(control.value);
2480
+ }
2481
+ isValid(value) {
2482
+ if (!!value && !this.utl.alphaDash(value)) {
2483
+ return { 'alpha_dash': this.mb.call('alpha_dash', this.fieldName, this.vmessage) };
2484
+ }
2485
+ return null;
2486
+ }
2487
+ }
2488
+ AlphaDashDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaDashDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2489
+ AlphaDashDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AlphaDashDirective, selector: "[alphaDash]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: AlphaDashDirective, multi: true }], ngImport: i0 });
2490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlphaDashDirective, decorators: [{
2491
+ type: Directive,
2492
+ args: [{
2493
+ selector: '[alphaDash]',
2494
+ providers: [{ provide: NG_VALIDATORS, useExisting: AlphaDashDirective, multi: true }]
2495
+ }]
2496
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2497
+ type: Input,
2498
+ args: ['message']
2499
+ }] } });
2500
+
2501
+ class NotRegexDirective {
2502
+ constructor(mb, el, utl) {
2503
+ this.mb = mb;
2504
+ this.el = el;
2505
+ this.utl = utl;
2506
+ this.vmessage = {};
2507
+ this.fieldName = 'field';
2508
+ this.notRegex = '';
2509
+ this.fieldName = this.el.nativeElement.name;
2510
+ }
2511
+ set message(data) {
2512
+ this.vmessage = data;
2513
+ }
2514
+ validate(control) {
2515
+ this.utl.setValidationRules(control, 'not_regex');
2516
+ return this.isValid(control.value);
2517
+ }
2518
+ isValid(value) {
2519
+ if (!!value && !this.utl.notRegex(value, this.notRegex)) {
2520
+ return { 'not_regex': this.mb.call('not_regex', this.fieldName, this.vmessage) };
2521
+ }
2522
+ return null;
2523
+ }
2524
+ }
2525
+ NotRegexDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotRegexDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2526
+ NotRegexDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NotRegexDirective, selector: "[notRegex]", inputs: { notRegex: "notRegex", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: NotRegexDirective, multi: true }], ngImport: i0 });
2527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NotRegexDirective, decorators: [{
2528
+ type: Directive,
2529
+ args: [{
2530
+ selector: '[notRegex]',
2531
+ providers: [{ provide: NG_VALIDATORS, useExisting: NotRegexDirective, multi: true }]
2532
+ }]
2533
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { notRegex: [{
2534
+ type: Input,
2535
+ args: ['notRegex']
2536
+ }], message: [{
2537
+ type: Input,
2538
+ args: ['message']
2539
+ }] } });
2540
+
2541
+ class UuidDirective {
2542
+ constructor(mb, el, utl) {
2543
+ this.mb = mb;
2544
+ this.el = el;
2545
+ this.utl = utl;
2546
+ this.vmessage = {};
2547
+ this.fieldName = 'field';
2548
+ this.fieldName = this.el.nativeElement.name;
2549
+ }
2550
+ set message(data) {
2551
+ this.vmessage = data;
2552
+ }
2553
+ validate(control) {
2554
+ this.utl.setValidationRules(control, 'uuid');
2555
+ return this.isValid(control.value);
2556
+ }
2557
+ isValid(value) {
2558
+ if (!!value && !this.utl.uuid(value)) {
2559
+ return { 'uuid': this.mb.call('uuid', this.fieldName, this.vmessage) };
2560
+ }
2561
+ return null;
2562
+ }
2563
+ }
2564
+ UuidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UuidDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2565
+ UuidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: UuidDirective, selector: "[uuid]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: UuidDirective, multi: true }], ngImport: i0 });
2566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UuidDirective, decorators: [{
2567
+ type: Directive,
2568
+ args: [{
2569
+ selector: '[uuid]',
2570
+ providers: [{ provide: NG_VALIDATORS, useExisting: UuidDirective, multi: true }]
2571
+ }]
2572
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2573
+ type: Input,
2574
+ args: ['message']
2575
+ }] } });
2576
+
2577
+ class UniqueDirective {
2578
+ constructor(el, utl, mb) {
2579
+ this.el = el;
2580
+ this.utl = utl;
2581
+ this.mb = mb;
2582
+ this.vmessage = {};
2583
+ this.fieldName = 'field';
2584
+ this.fieldName = this.el.nativeElement.name;
2585
+ }
2586
+ set message(data) {
2587
+ this.vmessage = data;
2588
+ }
2589
+ validate(control) {
2590
+ this.utl.setValidationRules(control, 'unique');
2591
+ return control.valueChanges.pipe(debounceTime(200), distinctUntilChanged(), switchMap((value) => value ? this.isValid(value) : of(null)), first());
2592
+ }
2593
+ isValid(value) {
2594
+ let cloned = cloneDeep(this.unique);
2595
+ let request = { ...{ [this.unique.field || this.fieldName]: value }, ...cloned['request'] };
2596
+ let unique = Object.assign(cloned, { request });
2597
+ return this.utl.unique(unique).pipe(map$1((isValid) => {
2598
+ return !isValid ? { 'unique': this.mb.call('unique', this.fieldName, this.vmessage) } : null;
2599
+ }));
2600
+ }
2601
+ }
2602
+ UniqueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UniqueDirective, deps: [{ token: i0.ElementRef }, { token: UtilService }, { token: MessageBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
2603
+ UniqueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: UniqueDirective, selector: "[unique]", inputs: { unique: "unique", message: "message" }, providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: UniqueDirective, multi: true }], ngImport: i0 });
2604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UniqueDirective, decorators: [{
2605
+ type: Directive,
2606
+ args: [{
2607
+ selector: '[unique]',
2608
+ providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: UniqueDirective, multi: true }]
2609
+ }]
2610
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: UtilService }, { type: MessageBuilderService }]; }, propDecorators: { unique: [{
2611
+ type: Input,
2612
+ args: ['unique']
2613
+ }], message: [{
2614
+ type: Input,
2615
+ args: ['message']
2616
+ }] } });
2617
+
2618
+ class CreditCardDirective {
2619
+ constructor(mb, el, utl) {
2620
+ this.mb = mb;
2621
+ this.el = el;
2622
+ this.utl = utl;
2623
+ this.vmessage = {};
2624
+ this.fieldName = 'field';
2625
+ this.fieldName = this.el.nativeElement.name;
2626
+ }
2627
+ set message(data) {
2628
+ this.vmessage = data;
2629
+ }
2630
+ validate(control) {
2631
+ this.utl.setValidationRules(control, 'credit_card', {
2632
+ credit_card: this.utl.getCreditCardData(control.value)
2633
+ });
2634
+ return this.isValid(control.value);
2635
+ }
2636
+ isValid(value) {
2637
+ if (!!value && !this.utl.creditCard(value)) {
2638
+ return { 'credit_card': this.mb.call('credit_card', this.fieldName, this.vmessage) };
2639
+ }
2640
+ return null;
2641
+ }
2642
+ }
2643
+ CreditCardDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreditCardDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2644
+ CreditCardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: CreditCardDirective, selector: "[creditCard]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: CreditCardDirective, multi: true }], ngImport: i0 });
2645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreditCardDirective, decorators: [{
2646
+ type: Directive,
2647
+ args: [{
2648
+ selector: '[creditCard]',
2649
+ providers: [{ provide: NG_VALIDATORS, useExisting: CreditCardDirective, multi: true }]
2650
+ }]
2651
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2652
+ type: Input,
2653
+ args: ['message']
2654
+ }] } });
2655
+
2656
+ class DebitCardDirective {
2657
+ constructor(mb, el, utl) {
2658
+ this.mb = mb;
2659
+ this.el = el;
2660
+ this.utl = utl;
2661
+ this.vmessage = {};
2662
+ this.fieldName = 'field';
2663
+ this.fieldName = this.el.nativeElement.name;
2664
+ }
2665
+ set message(data) {
2666
+ this.vmessage = data;
2667
+ }
2668
+ validate(control) {
2669
+ this.utl.setValidationRules(control, 'debit_card', {
2670
+ debit_card: this.utl.getCreditCardData(control.value)
2671
+ });
2672
+ return this.isValid(control.value);
2673
+ }
2674
+ isValid(value) {
2675
+ if (!!value && !this.utl.debitCard(value)) {
2676
+ return { 'debit_card': this.mb.call('debit_card', this.fieldName, this.vmessage) };
2677
+ }
2678
+ return null;
2679
+ }
2680
+ }
2681
+ DebitCardDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DebitCardDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2682
+ DebitCardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DebitCardDirective, selector: "[debitCard]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: DebitCardDirective, multi: true }], ngImport: i0 });
2683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DebitCardDirective, decorators: [{
2684
+ type: Directive,
2685
+ args: [{
2686
+ selector: '[debitCard]',
2687
+ providers: [{ provide: NG_VALIDATORS, useExisting: DebitCardDirective, multi: true }]
2688
+ }]
2689
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2690
+ type: Input,
2691
+ args: ['message']
2692
+ }] } });
2693
+
2694
+ class CvvDirective {
2695
+ constructor(mb, el, utl) {
2696
+ this.mb = mb;
2697
+ this.el = el;
2698
+ this.utl = utl;
2699
+ this.vmessage = {};
2700
+ this.fieldName = 'field';
2701
+ this.fieldName = this.el.nativeElement.name;
2702
+ }
2703
+ set message(data) {
2704
+ this.vmessage = data;
2705
+ }
2706
+ validate(control) {
2707
+ this.utl.setValidationRules(control, 'cvv');
2708
+ return this.isValid(control.value);
2709
+ }
2710
+ isValid(value) {
2711
+ if (!!value && !this.utl.cvv(value)) {
2712
+ return { 'cvv': this.mb.call('cvv', this.fieldName, this.vmessage) };
2713
+ }
2714
+ return null;
2715
+ }
2716
+ }
2717
+ CvvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CvvDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2718
+ CvvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: CvvDirective, selector: "[cvv]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: CvvDirective, multi: true }], ngImport: i0 });
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CvvDirective, decorators: [{
2720
+ type: Directive,
2721
+ args: [{
2722
+ selector: '[cvv]',
2723
+ providers: [{ provide: NG_VALIDATORS, useExisting: CvvDirective, multi: true }]
2724
+ }]
2725
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2726
+ type: Input,
2727
+ args: ['message']
2728
+ }] } });
2729
+
2730
+ class StrengthDirective {
2731
+ constructor(mb, el, utl) {
2732
+ this.mb = mb;
2733
+ this.el = el;
2734
+ this.utl = utl;
2735
+ this.vmessage = {};
2736
+ this.fieldName = 'field';
2737
+ this.strength = [];
2738
+ this.fieldName = this.el.nativeElement.name;
2739
+ }
2740
+ set message(data) {
2741
+ this.vmessage = data;
2742
+ }
2743
+ validate(control) {
2744
+ this.utl.setValidationRules(control, 'strength', {
2745
+ strength: this.utl.getStrengthData(control.value, this.strength)
2746
+ });
2747
+ return this.isValid(control.value);
2748
+ }
2749
+ isValid(value) {
2750
+ if (!!value && !this.utl.strength(value, this.strength)) {
2751
+ return { 'strength': this.mb.call('strength', this.fieldName, this.vmessage) };
2752
+ }
2753
+ return null;
2754
+ }
2755
+ }
2756
+ StrengthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StrengthDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2757
+ StrengthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: StrengthDirective, selector: "[strength]", inputs: { strength: "strength", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: StrengthDirective, multi: true }], ngImport: i0 });
2758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StrengthDirective, decorators: [{
2759
+ type: Directive,
2760
+ args: [{
2761
+ selector: '[strength]',
2762
+ providers: [{ provide: NG_VALIDATORS, useExisting: StrengthDirective, multi: true }]
2763
+ }]
2764
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { strength: [{
2765
+ type: Input,
2766
+ args: ['strength']
2767
+ }], message: [{
2768
+ type: Input,
2769
+ args: ['message']
2770
+ }] } });
2771
+
2772
+ class PhoneNoDirective {
2773
+ constructor(mb, el, utl) {
2774
+ this.mb = mb;
2775
+ this.el = el;
2776
+ this.utl = utl;
2777
+ this.vmessage = {};
2778
+ this.fieldName = 'field';
2779
+ this.PhoneNo = null;
2780
+ this.fieldName = this.el.nativeElement.name;
2781
+ }
2782
+ set message(data) {
2783
+ this.vmessage = data;
2784
+ }
2785
+ validate(control) {
2786
+ this.utl.setValidationRules(control, 'phone_no');
2787
+ return this.isValid(control.value);
2788
+ }
2789
+ isValid(value) {
2790
+ if (!!value && !this.utl.phoneNo(value, this.PhoneNo)) {
2791
+ return { 'phone_no': this.mb.call('phone_no', this.fieldName, this.vmessage) };
2792
+ }
2793
+ return null;
2794
+ }
2795
+ }
2796
+ PhoneNoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNoDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2797
+ PhoneNoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: PhoneNoDirective, selector: "[PhoneNo]", inputs: { PhoneNo: "PhoneNo", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: PhoneNoDirective, multi: true }], ngImport: i0 });
2798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNoDirective, decorators: [{
2799
+ type: Directive,
2800
+ args: [{
2801
+ selector: '[PhoneNo]',
2802
+ providers: [{ provide: NG_VALIDATORS, useExisting: PhoneNoDirective, multi: true }]
2803
+ }]
2804
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { PhoneNo: [{
2805
+ type: Input,
2806
+ args: ['PhoneNo']
2807
+ }], message: [{
2808
+ type: Input,
2809
+ args: ['message']
2810
+ }] } });
2811
+
2812
+ class RequiredDirective {
2813
+ constructor(mb, el, utl) {
2814
+ this.mb = mb;
2815
+ this.el = el;
2816
+ this.utl = utl;
2817
+ this.vmessage = {};
2818
+ this.fieldName = 'field';
2819
+ this.fieldName = this.el.nativeElement.name;
2820
+ }
2821
+ set message(data) {
2822
+ this.vmessage = data;
2823
+ }
2824
+ validate(control) {
2825
+ this.utl.setValidationRules(control, 'required');
2826
+ return this.isValid(control.value);
2827
+ }
2828
+ isValid(value) {
2829
+ if (!this.utl.required(value)) {
2830
+ return { 'required': this.mb.call('required', this.fieldName, this.vmessage) };
2831
+ }
2832
+ return null;
2833
+ }
2834
+ }
2835
+ RequiredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2836
+ RequiredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredDirective, selector: "[required]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredDirective, multi: true }], ngImport: i0 });
2837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredDirective, decorators: [{
2838
+ type: Directive,
2839
+ args: [{
2840
+ selector: '[required]',
2841
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredDirective, multi: true }]
2842
+ }]
2843
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
2844
+ type: Input,
2845
+ args: ['message']
2846
+ }] } });
2847
+
2848
+ class RequiredIfDirective {
2849
+ constructor(mb, el, utl) {
2850
+ this.mb = mb;
2851
+ this.el = el;
2852
+ this.utl = utl;
2853
+ this.vmessage = {};
2854
+ this.destroy$ = new Subject();
2855
+ this.wired = false;
2856
+ this.fieldName = 'field';
2857
+ this.requiredIf = [];
2858
+ this.fieldName = this.el.nativeElement.name;
2859
+ }
2860
+ set message(data) {
2861
+ this.vmessage = data;
2862
+ }
2863
+ validate(control) {
2864
+ this.utl.setValidationRules(control, 'required_if');
2865
+ this.wireSiblingWatchers(control);
2866
+ return this.isValid(control, this.requiredIf);
2867
+ }
2868
+ isValid(control, args) {
2869
+ if (!this.utl.requiredIf(control, args)) {
2870
+ let _args = toArray(args);
2871
+ return { 'required_if': this.mb.call('required_if', this.fieldName, ..._args, this.vmessage) };
2872
+ }
2873
+ return null;
2874
+ }
2875
+ wireSiblingWatchers(control) {
2876
+ if (this.wired)
2877
+ return;
2878
+ let [name, ...args] = toArray(this.requiredIf);
2879
+ let sibling = control.root.get(name);
2880
+ if (!sibling)
2881
+ return;
2882
+ this.wired = true;
2883
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
2884
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
2885
+ }
2886
+ ngOnDestroy() {
2887
+ this.destroy$.next();
2888
+ this.destroy$.complete();
2889
+ }
2890
+ }
2891
+ RequiredIfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredIfDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2892
+ RequiredIfDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredIfDirective, selector: "[requiredIf]", inputs: { requiredIf: "requiredIf", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredIfDirective, multi: true }], ngImport: i0 });
2893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredIfDirective, decorators: [{
2894
+ type: Directive,
2895
+ args: [{
2896
+ selector: '[requiredIf]',
2897
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredIfDirective, multi: true }]
2898
+ }]
2899
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredIf: [{
2900
+ type: Input,
2901
+ args: ['requiredIf']
2902
+ }], message: [{
2903
+ type: Input,
2904
+ args: ['message']
2905
+ }] } });
2906
+
2907
+ class RequiredUnlessDirective {
2908
+ constructor(mb, el, utl) {
2909
+ this.mb = mb;
2910
+ this.el = el;
2911
+ this.utl = utl;
2912
+ this.vmessage = {};
2913
+ this.destroy$ = new Subject();
2914
+ this.wired = false;
2915
+ this.fieldName = 'field';
2916
+ this.requiredUnless = [];
2917
+ this.fieldName = this.el.nativeElement.name;
2918
+ }
2919
+ set message(data) {
2920
+ this.vmessage = data;
2921
+ }
2922
+ validate(control) {
2923
+ this.utl.setValidationRules(control, 'required_unless');
2924
+ this.wireSiblingWatchers(control);
2925
+ return this.isValid(control, this.requiredUnless);
2926
+ }
2927
+ isValid(control, args) {
2928
+ if (!this.utl.requiredUnless(control, args)) {
2929
+ return { 'required_unless': this.mb.call('required_unless', this.fieldName, ...toArray(args), this.vmessage) };
2930
+ }
2931
+ return null;
2932
+ }
2933
+ wireSiblingWatchers(control) {
2934
+ if (this.wired)
2935
+ return;
2936
+ let [name, ...args] = toArray(this.requiredUnless);
2937
+ let sibling = control.root.get(name);
2938
+ if (!sibling)
2939
+ return;
2940
+ this.wired = true;
2941
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
2942
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
2943
+ }
2944
+ ngOnDestroy() {
2945
+ this.destroy$.next();
2946
+ this.destroy$.complete();
2947
+ }
2948
+ }
2949
+ RequiredUnlessDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredUnlessDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
2950
+ RequiredUnlessDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredUnlessDirective, selector: "[requiredUnless]", inputs: { requiredUnless: "requiredUnless", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredUnlessDirective, multi: true }], ngImport: i0 });
2951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredUnlessDirective, decorators: [{
2952
+ type: Directive,
2953
+ args: [{
2954
+ selector: '[requiredUnless]',
2955
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredUnlessDirective, multi: true }]
2956
+ }]
2957
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredUnless: [{
2958
+ type: Input,
2959
+ args: ['requiredUnless']
2960
+ }], message: [{
2961
+ type: Input,
2962
+ args: ['message']
2963
+ }] } });
2964
+
2965
+ class RequiredWithDirective {
2966
+ constructor(mb, el, utl) {
2967
+ this.mb = mb;
2968
+ this.el = el;
2969
+ this.utl = utl;
2970
+ this.vmessage = {};
2971
+ this.destroy$ = new Subject();
2972
+ this.wired = false;
2973
+ this.fieldName = 'field';
2974
+ this.requiredWith = [];
2975
+ this.fieldName = this.el.nativeElement.name;
2976
+ }
2977
+ set message(data) {
2978
+ this.vmessage = data;
2979
+ }
2980
+ validate(control) {
2981
+ this.utl.setValidationRules(control, 'required_with');
2982
+ this.wireSiblingWatchers(control);
2983
+ return this.isValid(control, this.requiredWith);
2984
+ }
2985
+ isValid(control, args) {
2986
+ if (!this.utl.requiredWith(control, args)) {
2987
+ return { 'required_with': this.mb.call('required_with', this.fieldName, ...toArray(args), this.vmessage) };
2988
+ }
2989
+ return null;
2990
+ }
2991
+ wireSiblingWatchers(control) {
2992
+ if (this.wired)
2993
+ return;
2994
+ let names = toArray(this.requiredWith);
2995
+ let siblings = names.map(name => control.root.get(name));
2996
+ if (siblings.filter(Boolean).length !== names.length)
2997
+ return;
2998
+ this.wired = true;
2999
+ siblings.forEach(sibling => {
3000
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
3001
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
3002
+ });
3003
+ }
3004
+ ngOnDestroy() {
3005
+ this.destroy$.next();
3006
+ this.destroy$.complete();
3007
+ }
3008
+ }
3009
+ RequiredWithDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3010
+ RequiredWithDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredWithDirective, selector: "[requiredWith]", inputs: { requiredWith: "requiredWith", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithDirective, multi: true }], ngImport: i0 });
3011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithDirective, decorators: [{
3012
+ type: Directive,
3013
+ args: [{
3014
+ selector: '[requiredWith]',
3015
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithDirective, multi: true }]
3016
+ }]
3017
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredWith: [{
3018
+ type: Input,
3019
+ args: ['requiredWith']
3020
+ }], message: [{
3021
+ type: Input,
3022
+ args: ['message']
3023
+ }] } });
3024
+
3025
+ class RequiredWithAllDirective {
3026
+ constructor(mb, el, utl) {
3027
+ this.mb = mb;
3028
+ this.el = el;
3029
+ this.utl = utl;
3030
+ this.vmessage = {};
3031
+ this.destroy$ = new Subject();
3032
+ this.wired = false;
3033
+ this.fieldName = 'field';
3034
+ this.requiredWithAll = [];
3035
+ this.fieldName = this.el.nativeElement.name;
3036
+ }
3037
+ set message(data) {
3038
+ this.vmessage = data;
3039
+ }
3040
+ validate(control) {
3041
+ this.utl.setValidationRules(control, 'required_with_all');
3042
+ this.wireSiblingWatchers(control);
3043
+ return this.isValid(control, this.requiredWithAll);
3044
+ }
3045
+ isValid(control, args) {
3046
+ if (!this.utl.requiredWithAll(control, args)) {
3047
+ return { 'required_with_all': this.mb.call('required_with_all', this.fieldName, ...toArray(args), this.vmessage) };
3048
+ }
3049
+ return null;
3050
+ }
3051
+ wireSiblingWatchers(control) {
3052
+ if (this.wired)
3053
+ return;
3054
+ let names = toArray(this.requiredWithAll);
3055
+ let siblings = names.map(name => control.root.get(name));
3056
+ if (siblings.filter(Boolean).length !== names.length)
3057
+ return;
3058
+ this.wired = true;
3059
+ siblings.forEach(sibling => {
3060
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
3061
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
3062
+ });
3063
+ }
3064
+ ngOnDestroy() {
3065
+ this.destroy$.next();
3066
+ this.destroy$.complete();
3067
+ }
3068
+ }
3069
+ RequiredWithAllDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithAllDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3070
+ RequiredWithAllDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredWithAllDirective, selector: "[requiredWithAll]", inputs: { requiredWithAll: "requiredWithAll", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithAllDirective, multi: true }], ngImport: i0 });
3071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithAllDirective, decorators: [{
3072
+ type: Directive,
3073
+ args: [{
3074
+ selector: '[requiredWithAll]',
3075
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithAllDirective, multi: true }]
3076
+ }]
3077
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredWithAll: [{
3078
+ type: Input,
3079
+ args: ['requiredWithAll']
3080
+ }], message: [{
3081
+ type: Input,
3082
+ args: ['message']
3083
+ }] } });
3084
+
3085
+ class RequiredWithoutDirective {
3086
+ constructor(mb, el, utl) {
3087
+ this.mb = mb;
3088
+ this.el = el;
3089
+ this.utl = utl;
3090
+ this.vmessage = {};
3091
+ this.destroy$ = new Subject();
3092
+ this.wired = false;
3093
+ this.fieldName = 'field';
3094
+ this.requiredWithout = [];
3095
+ this.fieldName = this.el.nativeElement.name;
3096
+ }
3097
+ set message(data) {
3098
+ this.vmessage = data;
3099
+ }
3100
+ validate(control) {
3101
+ this.utl.setValidationRules(control, 'required_without');
3102
+ this.wireSiblingWatchers(control);
3103
+ return this.isValid(control, this.requiredWithout);
3104
+ }
3105
+ isValid(control, args) {
3106
+ if (!this.utl.requiredWithout(control, args)) {
3107
+ return { 'required_without': this.mb.call('required_without', this.fieldName, ...toArray(args), this.vmessage) };
3108
+ }
3109
+ return null;
3110
+ }
3111
+ wireSiblingWatchers(control) {
3112
+ if (this.wired)
3113
+ return;
3114
+ let names = toArray(this.requiredWithout);
3115
+ let siblings = names.map(name => control.root.get(name));
3116
+ if (siblings.filter(Boolean).length !== names.length)
3117
+ return;
3118
+ this.wired = true;
3119
+ siblings.forEach(sibling => {
3120
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
3121
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
3122
+ });
3123
+ }
3124
+ ngOnDestroy() {
3125
+ this.destroy$.next();
3126
+ this.destroy$.complete();
3127
+ }
3128
+ }
3129
+ RequiredWithoutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithoutDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3130
+ RequiredWithoutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredWithoutDirective, selector: "[requiredWithout]", inputs: { requiredWithout: "requiredWithout", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithoutDirective, multi: true }], ngImport: i0 });
3131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithoutDirective, decorators: [{
3132
+ type: Directive,
3133
+ args: [{
3134
+ selector: '[requiredWithout]',
3135
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithoutDirective, multi: true }]
3136
+ }]
3137
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredWithout: [{
3138
+ type: Input,
3139
+ args: ['requiredWithout']
3140
+ }], message: [{
3141
+ type: Input,
3142
+ args: ['message']
3143
+ }] } });
3144
+
3145
+ class RequiredWithoutAllDirective {
3146
+ constructor(mb, el, utl) {
3147
+ this.mb = mb;
3148
+ this.el = el;
3149
+ this.utl = utl;
3150
+ this.vmessage = {};
3151
+ this.destroy$ = new Subject();
3152
+ this.wired = false;
3153
+ this.fieldName = 'field';
3154
+ this.requiredWithoutAll = [];
3155
+ this.fieldName = this.el.nativeElement.name;
3156
+ }
3157
+ set message(data) {
3158
+ this.vmessage = data;
3159
+ }
3160
+ validate(control) {
3161
+ this.utl.setValidationRules(control, 'required_without_all');
3162
+ this.wireSiblingWatchers(control);
3163
+ return this.isValid(control, this.requiredWithoutAll);
3164
+ }
3165
+ isValid(control, args) {
3166
+ if (!this.utl.requiredWithoutAll(control, args)) {
3167
+ return { 'required_without_all': this.mb.call('required_without_all', this.fieldName, ...toArray(args), this.vmessage) };
3168
+ }
3169
+ return null;
3170
+ }
3171
+ wireSiblingWatchers(control) {
3172
+ if (this.wired)
3173
+ return;
3174
+ let names = toArray(this.requiredWithoutAll);
3175
+ let siblings = names.map(name => control.root.get(name));
3176
+ if (siblings.filter(Boolean).length !== names.length)
3177
+ return;
3178
+ this.wired = true;
3179
+ siblings.forEach(sibling => {
3180
+ sibling.valueChanges.pipe(debounceTime(200), takeUntil(this.destroy$))
3181
+ .subscribe(() => control.updateValueAndValidity({ onlySelf: true }));
3182
+ });
3183
+ }
3184
+ ngOnDestroy() {
3185
+ this.destroy$.next();
3186
+ this.destroy$.complete();
3187
+ }
3188
+ }
3189
+ RequiredWithoutAllDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithoutAllDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3190
+ RequiredWithoutAllDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: RequiredWithoutAllDirective, selector: "[requiredWithoutAll]", inputs: { requiredWithoutAll: "requiredWithoutAll", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithoutAllDirective, multi: true }], ngImport: i0 });
3191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RequiredWithoutAllDirective, decorators: [{
3192
+ type: Directive,
3193
+ args: [{
3194
+ selector: '[requiredWithoutAll]',
3195
+ providers: [{ provide: NG_VALIDATORS, useExisting: RequiredWithoutAllDirective, multi: true }]
3196
+ }]
3197
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { requiredWithoutAll: [{
3198
+ type: Input,
3199
+ args: ['requiredWithoutAll']
3200
+ }], message: [{
3201
+ type: Input,
3202
+ args: ['message']
3203
+ }] } });
3204
+
3205
+ class MimesDirective {
3206
+ constructor(mb, el, utl) {
3207
+ this.mb = mb;
3208
+ this.el = el;
3209
+ this.utl = utl;
3210
+ this.vmessage = {};
3211
+ this.fieldName = 'field';
3212
+ this.mimes = [];
3213
+ this.fieldName = this.el.nativeElement.name;
3214
+ }
3215
+ set message(data) {
3216
+ this.vmessage = data;
3217
+ }
3218
+ validate(control) {
3219
+ this.utl.setValidationRules(control, 'mimes');
3220
+ return this.isValid(this.el.nativeElement.files, this.mimes);
3221
+ }
3222
+ isValid(fileInstance, mimes) {
3223
+ if (!!fileInstance && fileInstance.length > 0 && this.utl.mimes(fileInstance, mimes)) {
3224
+ let _mimes = toArray(mimes);
3225
+ return { 'mimes': this.mb.call('mimes', this.fieldName, ..._mimes, this.vmessage) };
3226
+ }
3227
+ return null;
3228
+ }
3229
+ }
3230
+ MimesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MimesDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3231
+ MimesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: MimesDirective, selector: "[mimes]", inputs: { mimes: "mimes", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: MimesDirective, multi: true }], ngImport: i0 });
3232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MimesDirective, decorators: [{
3233
+ type: Directive,
3234
+ args: [{
3235
+ selector: '[mimes]',
3236
+ providers: [{ provide: NG_VALIDATORS, useExisting: MimesDirective, multi: true }]
3237
+ }]
3238
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { mimes: [{
3239
+ type: Input,
3240
+ args: ['mimes']
3241
+ }], message: [{
3242
+ type: Input,
3243
+ args: ['message']
3244
+ }] } });
3245
+
3246
+ class SizeDirective {
3247
+ constructor(mb, el, utl) {
3248
+ this.mb = mb;
3249
+ this.el = el;
3250
+ this.utl = utl;
3251
+ this.vmessage = {};
3252
+ this.fieldName = 'field';
3253
+ this.fieldName = this.el.nativeElement.name;
3254
+ }
3255
+ set message(data) {
3256
+ this.vmessage = data;
3257
+ }
3258
+ validate(control) {
3259
+ this.utl.setValidationRules(control, 'mimes');
3260
+ return this.isValid(this.el.nativeElement.files, this.size);
3261
+ }
3262
+ isValid(fileInstance, mimes) {
3263
+ if (!!fileInstance && fileInstance.length > 0 && !this.utl.size(fileInstance, mimes)) {
3264
+ return { 'size': this.mb.call('size', this.fieldName, mimes, this.vmessage) };
3265
+ }
3266
+ return null;
3267
+ }
3268
+ }
3269
+ SizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SizeDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3270
+ SizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: SizeDirective, selector: "[size]", inputs: { size: "size", message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: SizeDirective, multi: true }], ngImport: i0 });
3271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SizeDirective, decorators: [{
3272
+ type: Directive,
3273
+ args: [{
3274
+ selector: '[size]',
3275
+ providers: [{ provide: NG_VALIDATORS, useExisting: SizeDirective, multi: true }]
3276
+ }]
3277
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { size: [{
3278
+ type: Input,
3279
+ args: ['size']
3280
+ }], message: [{
3281
+ type: Input,
3282
+ args: ['message']
3283
+ }] } });
3284
+
3285
+ class DimensionDirective {
3286
+ constructor(el, utl, mb) {
3287
+ this.el = el;
3288
+ this.utl = utl;
3289
+ this.mb = mb;
3290
+ this.vmessage = {};
3291
+ this.fieldName = 'field';
3292
+ this.dimension = [];
3293
+ this.fieldName = this.el.nativeElement.name;
3294
+ }
3295
+ set message(data) {
3296
+ this.vmessage = data;
3297
+ }
3298
+ validate(control) {
3299
+ this.utl.setValidationRules(control, 'dimension');
3300
+ return this.isValid();
3301
+ }
3302
+ isValid() {
3303
+ let files = this.el.nativeElement.files;
3304
+ if (files.length === 0) {
3305
+ return of(null);
3306
+ }
3307
+ return this.utl.dimension(files, this.dimension).pipe(map$1((isValid) => {
3308
+ return !isValid ? { 'dimension': this.mb.call('dimension', this.fieldName, this.dimension, this.vmessage) } : null;
3309
+ }));
3310
+ }
3311
+ }
3312
+ DimensionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DimensionDirective, deps: [{ token: i0.ElementRef }, { token: UtilService }, { token: MessageBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
3313
+ DimensionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: DimensionDirective, selector: "[dimension]", inputs: { dimension: "dimension", message: "message" }, providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: DimensionDirective, multi: true }], ngImport: i0 });
3314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DimensionDirective, decorators: [{
3315
+ type: Directive,
3316
+ args: [{
3317
+ selector: '[dimension]',
3318
+ providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: DimensionDirective, multi: true }]
3319
+ }]
3320
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: UtilService }, { type: MessageBuilderService }]; }, propDecorators: { dimension: [{
3321
+ type: Input,
3322
+ args: ['dimension']
3323
+ }], message: [{
3324
+ type: Input,
3325
+ args: ['message']
3326
+ }] } });
3327
+
3328
+ class ImageDirective {
3329
+ constructor(mb, el, utl) {
3330
+ this.mb = mb;
3331
+ this.el = el;
3332
+ this.utl = utl;
3333
+ this.vmessage = {};
3334
+ this.fieldName = 'field';
3335
+ this.fieldName = this.el.nativeElement.name;
3336
+ }
3337
+ set message(data) {
3338
+ this.vmessage = data;
3339
+ }
3340
+ validate(control) {
3341
+ this.utl.setValidationRules(control, 'image');
3342
+ return this.isValid(this.el.nativeElement.files);
3343
+ }
3344
+ isValid(fileInstance) {
3345
+ if (!!fileInstance && fileInstance.length > 0 && !this.utl.image(fileInstance)) {
3346
+ return { 'image': this.mb.call('image', this.fieldName, this.message) };
3347
+ }
3348
+ return null;
3349
+ }
3350
+ }
3351
+ ImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ImageDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3352
+ ImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ImageDirective, selector: "[image]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: ImageDirective, multi: true }], ngImport: i0 });
3353
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ImageDirective, decorators: [{
3354
+ type: Directive,
3355
+ args: [{
3356
+ selector: '[image]',
3357
+ providers: [{ provide: NG_VALIDATORS, useExisting: ImageDirective, multi: true }]
3358
+ }]
3359
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
3360
+ type: Input,
3361
+ args: ['message']
3362
+ }] } });
3363
+
3364
+ class VideoDirective {
3365
+ constructor(mb, el, utl) {
3366
+ this.mb = mb;
3367
+ this.el = el;
3368
+ this.utl = utl;
3369
+ this.vmessage = {};
3370
+ this.fieldName = 'field';
3371
+ this.fieldName = this.el.nativeElement.name;
3372
+ }
3373
+ set message(data) {
3374
+ this.vmessage = data;
3375
+ }
3376
+ validate(control) {
3377
+ this.utl.setValidationRules(control, 'video');
3378
+ return this.isValid(this.el.nativeElement.files);
3379
+ }
3380
+ isValid(fileInstance) {
3381
+ if (!!fileInstance && fileInstance.length > 0 && !this.utl.video(fileInstance)) {
3382
+ return { 'video': this.mb.call('video', this.fieldName, this.vmessage) };
3383
+ }
3384
+ return null;
3385
+ }
3386
+ }
3387
+ VideoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VideoDirective, deps: [{ token: MessageBuilderService }, { token: i0.ElementRef }, { token: UtilService }], target: i0.ɵɵFactoryTarget.Directive });
3388
+ VideoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: VideoDirective, selector: "[video]", inputs: { message: "message" }, providers: [{ provide: NG_VALIDATORS, useExisting: VideoDirective, multi: true }], ngImport: i0 });
3389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VideoDirective, decorators: [{
3390
+ type: Directive,
3391
+ args: [{
3392
+ selector: '[video]',
3393
+ providers: [{ provide: NG_VALIDATORS, useExisting: VideoDirective, multi: true }]
3394
+ }]
3395
+ }], ctorParameters: function () { return [{ type: MessageBuilderService }, { type: i0.ElementRef }, { type: UtilService }]; }, propDecorators: { message: [{
3396
+ type: Input,
3397
+ args: ['message']
3398
+ }] } });
3399
+
3400
+ class ExistsDirective {
3401
+ constructor(el, utl, mb) {
3402
+ this.el = el;
3403
+ this.utl = utl;
3404
+ this.mb = mb;
3405
+ this.vmessage = {};
3406
+ this.fieldName = 'field';
3407
+ this.fieldName = this.el.nativeElement.name;
3408
+ }
3409
+ set message(data) {
3410
+ this.vmessage = data;
3411
+ }
3412
+ validate(control) {
3413
+ this.utl.setValidationRules(control, 'exists');
3414
+ return control.valueChanges.pipe(debounceTime(200), distinctUntilChanged$1(), switchMap((value) => value ? this.isValid(value) : of(null)), first$1());
3415
+ }
3416
+ isValid(value) {
3417
+ let cloned = cloneDeep(this.exists);
3418
+ let request = { ...{ [this.exists.field || this.fieldName]: value }, ...cloned['request'] };
3419
+ let exists = Object.assign(cloned, { request });
3420
+ return this.utl.exists(exists).pipe(map$1((isValid) => {
3421
+ return !isValid ? { 'exists': this.mb.call('exists', this.fieldName, this.vmessage) } : null;
3422
+ }));
3423
+ }
3424
+ }
3425
+ ExistsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExistsDirective, deps: [{ token: i0.ElementRef }, { token: UtilService }, { token: MessageBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
3426
+ ExistsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ExistsDirective, selector: "[exists]", inputs: { exists: "exists", message: "message" }, providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: ExistsDirective, multi: true }], ngImport: i0 });
3427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExistsDirective, decorators: [{
3428
+ type: Directive,
3429
+ args: [{
3430
+ selector: '[exists]',
3431
+ providers: [{ provide: NG_ASYNC_VALIDATORS, useExisting: ExistsDirective, multi: true }]
3432
+ }]
3433
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: UtilService }, { type: MessageBuilderService }]; }, propDecorators: { exists: [{
3434
+ type: Input,
3435
+ args: ['exists']
3436
+ }], message: [{
3437
+ type: Input,
3438
+ args: ['message']
3439
+ }] } });
3440
+
3441
+ const rulesDirectives = [
3442
+ RuleDirective,
3443
+ RequiredDirective, AboveDirective, AcceptedDirective, AfterDirective,
3444
+ AlphaDirective, AlphaNumericDirective, ArrayDirective, UrlDirective,
3445
+ DateDirective, BeforeDirective, BooleanDirective, ConfirmedDirective,
3446
+ DateFormatDirective, DifferentDirective, EmailDirective, InDirective,
3447
+ EqualsDirective, EndsWithDirective, IncludesDirective, Ipv4Directive,
3448
+ SameDirective, IpDirective, Ipv6Directive, JsonDirective, MaxDirective,
3449
+ MinDirective, NotEqualsDirective, NotInDirective, StartsWithDirective,
3450
+ RangeDirective, BetweenDirective, RegexDirective, IntegerDirective,
3451
+ NumberDirective, StringDirective, UnderDirective, NotRegexDirective,
3452
+ UuidDirective, UniqueDirective, CreditCardDirective, DebitCardDirective,
3453
+ CvvDirective, StrengthDirective, PhoneNoDirective, RequiredIfDirective,
3454
+ RequiredUnlessDirective, RequiredWithDirective, RequiredWithAllDirective,
3455
+ RequiredWithoutDirective, RequiredWithoutAllDirective, MimesDirective,
3456
+ SizeDirective, DimensionDirective, ImageDirective, VideoDirective,
3457
+ ExistsDirective, AlphaDashDirective
3458
+ ];
3459
+ class RuleModule {
3460
+ }
3461
+ RuleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RuleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3462
+ RuleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: RuleModule, declarations: [RuleDirective,
3463
+ RequiredDirective, AboveDirective, AcceptedDirective, AfterDirective,
3464
+ AlphaDirective, AlphaNumericDirective, ArrayDirective, UrlDirective,
3465
+ DateDirective, BeforeDirective, BooleanDirective, ConfirmedDirective,
3466
+ DateFormatDirective, DifferentDirective, EmailDirective, InDirective,
3467
+ EqualsDirective, EndsWithDirective, IncludesDirective, Ipv4Directive,
3468
+ SameDirective, IpDirective, Ipv6Directive, JsonDirective, MaxDirective,
3469
+ MinDirective, NotEqualsDirective, NotInDirective, StartsWithDirective,
3470
+ RangeDirective, BetweenDirective, RegexDirective, IntegerDirective,
3471
+ NumberDirective, StringDirective, UnderDirective, NotRegexDirective,
3472
+ UuidDirective, UniqueDirective, CreditCardDirective, DebitCardDirective,
3473
+ CvvDirective, StrengthDirective, PhoneNoDirective, RequiredIfDirective,
3474
+ RequiredUnlessDirective, RequiredWithDirective, RequiredWithAllDirective,
3475
+ RequiredWithoutDirective, RequiredWithoutAllDirective, MimesDirective,
3476
+ SizeDirective, DimensionDirective, ImageDirective, VideoDirective,
3477
+ ExistsDirective, AlphaDashDirective], imports: [CommonModule], exports: [RuleDirective,
3478
+ RequiredDirective, AboveDirective, AcceptedDirective, AfterDirective,
3479
+ AlphaDirective, AlphaNumericDirective, ArrayDirective, UrlDirective,
3480
+ DateDirective, BeforeDirective, BooleanDirective, ConfirmedDirective,
3481
+ DateFormatDirective, DifferentDirective, EmailDirective, InDirective,
3482
+ EqualsDirective, EndsWithDirective, IncludesDirective, Ipv4Directive,
3483
+ SameDirective, IpDirective, Ipv6Directive, JsonDirective, MaxDirective,
3484
+ MinDirective, NotEqualsDirective, NotInDirective, StartsWithDirective,
3485
+ RangeDirective, BetweenDirective, RegexDirective, IntegerDirective,
3486
+ NumberDirective, StringDirective, UnderDirective, NotRegexDirective,
3487
+ UuidDirective, UniqueDirective, CreditCardDirective, DebitCardDirective,
3488
+ CvvDirective, StrengthDirective, PhoneNoDirective, RequiredIfDirective,
3489
+ RequiredUnlessDirective, RequiredWithDirective, RequiredWithAllDirective,
3490
+ RequiredWithoutDirective, RequiredWithoutAllDirective, MimesDirective,
3491
+ SizeDirective, DimensionDirective, ImageDirective, VideoDirective,
3492
+ ExistsDirective, AlphaDashDirective] });
3493
+ RuleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RuleModule, providers: [
3494
+ UtilService,
3495
+ ValidateRuleService,
3496
+ MessageBuilderService,
3497
+ ], imports: [CommonModule] });
3498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: RuleModule, decorators: [{
3499
+ type: NgModule,
3500
+ args: [{
3501
+ declarations: [
3502
+ ...rulesDirectives
3503
+ ],
3504
+ imports: [
3505
+ CommonModule
3506
+ ],
3507
+ providers: [
3508
+ UtilService,
3509
+ ValidateRuleService,
3510
+ MessageBuilderService,
3511
+ ],
3512
+ exports: [
3513
+ ...rulesDirectives
3514
+ ],
3515
+ }]
3516
+ }] });
3517
+
3518
+ class ReactiveValidator {
3519
+ constructor(rule, utl, mb) {
3520
+ this.rule = rule;
3521
+ this.utl = utl;
3522
+ this.mb = mb;
3523
+ this.fieldDefaultNameRule = GlobalConstant.fieldDefaultNameRule;
3524
+ this.customFieldName = GlobalConstant.customFieldName;
3525
+ }
3526
+ map(rule, message = {}) {
3527
+ return (control) => {
3528
+ let ctrlName = control[this.customFieldName] ?? (control[this.customFieldName] = this.getControlName(control));
3529
+ return ctrlName ? this.rule.gererateRuleAndValidate(ctrlName, control, rule, message) : null;
3530
+ };
3531
+ }
3532
+ unique(exists, message = {}) {
3533
+ return (control) => {
3534
+ if (!this || !this.customFieldName)
3535
+ return of(null);
3536
+ let fieldName = control[this.customFieldName] || null;
3537
+ exists['request'] = { ...{ [exists.field || fieldName]: control.value }, ...exists['request'] };
3538
+ return this.utl.exists(exists).pipe(map$1((isValid) => {
3539
+ return !isValid ? { 'unique': this.mb.call('unique', fieldName, message) } : null;
3540
+ }));
3541
+ };
3542
+ }
3543
+ exists(exists, message = {}) {
3544
+ return (control) => {
3545
+ if (!this || !this.customFieldName)
3546
+ return of(null);
3547
+ let fieldName = control[this.customFieldName] || null;
3548
+ exists['request'] = { ...{ [exists.field || fieldName]: control.value }, ...exists['request'] };
3549
+ return this.utl.exists(exists).pipe(map$1((isValid) => {
3550
+ return !isValid ? { 'exists': this.mb.call('exists', fieldName, message) } : null;
3551
+ }));
3552
+ };
3553
+ }
3554
+ dimension(args, message = {}) {
3555
+ return (control) => {
3556
+ if (!this || !this.customFieldName)
3557
+ return of(null);
3558
+ let fileInstance = control['nativeElement'] ? control['nativeElement'].files : null;
3559
+ let fieldName = control[this.customFieldName] || null;
3560
+ return this.utl.dimension(fileInstance, args).pipe(map$1((isValid) => {
3561
+ return !isValid ? { 'dimension': this.mb.call('dimension', fieldName, args, message) } : null;
3562
+ }));
3563
+ };
3564
+ }
3565
+ getControlName(control) {
3566
+ const parent = control.parent;
3567
+ if (!parent)
3568
+ return null;
3569
+ const controls = parent.controls;
3570
+ const name = Object.keys(controls).find(key => controls[key] === control);
3571
+ return name ?? null;
3572
+ }
3573
+ }
3574
+ ReactiveValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReactiveValidator, deps: [{ token: ValidateRuleService }, { token: UtilService }, { token: MessageBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
3575
+ ReactiveValidator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReactiveValidator });
3576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReactiveValidator, decorators: [{
3577
+ type: Injectable
3578
+ }], ctorParameters: function () { return [{ type: ValidateRuleService }, { type: UtilService }, { type: MessageBuilderService }]; } });
3579
+
3580
+ class NativeElementDirective {
3581
+ constructor(el, control) {
3582
+ this.el = el;
3583
+ this.control = control;
3584
+ this.field_name = '';
3585
+ this.setNativElement();
3586
+ }
3587
+ setNativElement() {
3588
+ //setTimeout(()=>{
3589
+ let customElementName = GlobalConstant.customElementName;
3590
+ let customFieldName = GlobalConstant.customFieldName;
3591
+ if (this.control && this.control.control) {
3592
+ this.control.control[customElementName] = this.el.nativeElement;
3593
+ this.control.control[customFieldName] = this.el.nativeElement.name || this.field_name;
3594
+ }
3595
+ //})
3596
+ }
3597
+ }
3598
+ NativeElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NativeElementDirective, deps: [{ token: i0.ElementRef }, { token: i1$2.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
3599
+ NativeElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NativeElementDirective, selector: "[formControl],[formControlName]", inputs: { field_name: ["formControlName", "field_name"] }, ngImport: i0 });
3600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NativeElementDirective, decorators: [{
3601
+ type: Directive,
3602
+ args: [{
3603
+ selector: '[formControl],[formControlName]'
3604
+ }]
3605
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.NgControl }]; }, propDecorators: { field_name: [{
3606
+ type: Input,
3607
+ args: ['formControlName']
3608
+ }] } });
3609
+
3610
+ var en = {
3611
+ "above": "The :attribute should be above :arg0.",
3612
+ "accepted": "The :attribute must be accepted.",
3613
+ "after": "The :attribute must be a date after :arg0.",
3614
+ "alpha": "The :attribute may only contain letters.",
3615
+ "alpha_dash": "The :attribute may only contain letters, numbers, dashes and underscores.",
3616
+ "alpha_numeric": "The :attribute may only contain letters and numbers.",
3617
+ "array": "The :attribute must be an array.",
3618
+ "before": "The :attribute must be a date before :arg0.",
3619
+ "boolean": "The :attribute field must be true or false.",
3620
+ "confirmed": "The :attribute confirmation does not match.",
3621
+ "credit_card": "The :attribute must be a valid credit card number.",
3622
+ "cvv": "The :attribute must be a valid CVV number.",
3623
+ "date": "The :attribute is not a valid date.",
3624
+ "date_format": "The :attribute does not match the format :arg0.",
3625
+ "debit_card": "The :attribute must be a valid debit card number.",
3626
+ "different": "The :attribute and :arg0 must be different.",
3627
+ "dimension": "The :attribute has invalid image dimension.",
3628
+ "email": "The :attribute must be a valid email address.",
3629
+ "ends_with": "The :attribute must end with one of the following :arg0:",
3630
+ "equals": "The :attribute must be equal with :arg0",
3631
+ "exists": "The selected :attribute is invalid.",
3632
+ "image": "The :attribute must be a valid image.",
3633
+ "in": "The selected :attribute must be in :arg0:.",
3634
+ "includes": "The :attribute must be contain with :arg0:.",
3635
+ "integer": "The :attribute must be an integer.",
3636
+ "ip": "The :attribute must be a valid IP address.",
3637
+ "ipv4": "The :attribute must be a valid IPv4 address.",
3638
+ "ipv6": "The :attribute must be a valid IPv6 address.",
3639
+ "json": "The :attribute must be a valid JSON string.",
3640
+ "max": {
3641
+ "array": "The :attribute may not have more than :arg0 items.",
3642
+ "numeric": "The :attribute may not be greater than :arg0.",
3643
+ "string": "The :attribute may not be greater than :arg0 characters."
3644
+ },
3645
+ "min": {
3646
+ "array": "The :attribute must have at least :arg0 items.",
3647
+ "numeric": "The :attribute must be at least :arg0.",
3648
+ "string": "The :attribute must be at least :arg0 characters."
3649
+ },
3650
+ "mimes": "The :attribute must be a file of type :arg0:.",
3651
+ "not_equals": "The :attribute must not be equal with :arg0",
3652
+ "not_in": "The selected :attribute must not be in :arg0:.",
3653
+ "not_regex": "The :attribute format is invalid.",
3654
+ "number": "The :attribute must be a number.",
3655
+ "phone_no": "The :attribute must be a valid phone number.",
3656
+ "range": "The :attribute must be between :arg0 and :arg1.",
3657
+ "between": "The :attribute must be between :arg0 and :arg1, exclusive of both.",
3658
+ "regex": "The :attribute format is invalid.",
3659
+ "required": "The :attribute field is required.",
3660
+ "required_if": "The :attribute field is required when :arg0 is :arg1.",
3661
+ "required_unless": "The :attribute field is required unless :arg0 is in :arg1:.",
3662
+ "required_with": "The :attribute field is required when any of :arg0: is present.",
3663
+ "required_with_all": "The :attribute field is required when :arg0: are present.",
3664
+ "required_without": "The :attribute field is required when :arg0: is not present.",
3665
+ "required_without_all": "The :attribute field is required when none of :arg0: are present.",
3666
+ "same": "The :attribute and :arg0 must match.",
3667
+ "size": "The :attribute must be :arg0 KB or less.",
3668
+ "starts_with": "The :attribute must start with one of the following :arg0",
3669
+ "string": "The :attribute must be a string.",
3670
+ "strength": "The :attribute is not strong enough.",
3671
+ "under": "The :attribute must be under :arg0.",
3672
+ "url": "The :attribute format is invalid.",
3673
+ "uuid": "The :attribute must be a valid UUID.",
3674
+ "unique": "The :attribute has already been taken.",
3675
+ "video": "The :attribute must be a valid video."
3676
+ };
3677
+
3678
+ var de = {
3679
+ "above": "Das Feld :attribute muss über :arg0 liegen.",
3680
+ "accepted": "Das Feld :attribute muss akzeptiert werden.",
3681
+ "after": "Das Feld :attribute muss ein Datum nach :arg0 sein.",
3682
+ "alpha": "Das Feld :attribute darf nur Buchstaben enthalten.",
3683
+ "alpha_dash": "Das Feld :attribute darf nur Buchstaben, Zahlen, Bindestriche und Unterstriche enthalten.",
3684
+ "alpha_numeric": "Das Feld :attribute darf nur Buchstaben und Zahlen enthalten.",
3685
+ "array": "Das Feld :attribute muss ein Array sein.",
3686
+ "before": "Das Feld :attribute muss ein Datum vor :arg0 sein.",
3687
+ "boolean": "Das Feld :attribute muss wahr oder falsch sein.",
3688
+ "confirmed": "Die Bestätigung von :attribute stimmt nicht überein.",
3689
+ "credit_card": "Das Feld :attribute muss eine gültige Kreditkartennummer sein.",
3690
+ "cvv": "Das Feld :attribute muss eine gültige CVV-Nummer sein.",
3691
+ "date": "Das Feld :attribute ist kein gültiges Datum.",
3692
+ "date_format": "Das Feld :attribute entspricht nicht dem Format :arg0.",
3693
+ "debit_card": "Das Feld :attribute muss eine gültige Debitkartennummer sein.",
3694
+ "different": "Die Felder :attribute und :arg0 müssen unterschiedlich sein.",
3695
+ "dimension": "Das Feld :attribute hat eine ungültige Bildgröße.",
3696
+ "email": "Das Feld :attribute muss eine gültige E-Mail-Adresse sein.",
3697
+ "ends_with": "Das Feld :attribute muss mit einem der folgenden Werte enden: :arg0:",
3698
+ "equals": "Das Feld :attribute muss gleich :arg0 sein.",
3699
+ "exists": "Das ausgewählte Feld :attribute ist ungültig.",
3700
+ "image": "Das Feld :attribute muss ein gültiges Bild sein.",
3701
+ "in": "Das ausgewählte Feld :attribute muss in :arg0: enthalten sein.",
3702
+ "includes": "Das Feld :attribute muss :arg0: enthalten.",
3703
+ "integer": "Das Feld :attribute muss eine ganze Zahl sein.",
3704
+ "ip": "Das Feld :attribute muss eine gültige IP-Adresse sein.",
3705
+ "ipv4": "Das Feld :attribute muss eine gültige IPv4-Adresse sein.",
3706
+ "ipv6": "Das Feld :attribute muss eine gültige IPv6-Adresse sein.",
3707
+ "json": "Das Feld :attribute muss eine gültige JSON-Zeichenfolge sein.",
3708
+ "max": {
3709
+ "array": "Das Feld :attribute darf nicht mehr als :arg0 Elemente enthalten.",
3710
+ "numeric": "Das Feld :attribute darf nicht größer als :arg0 sein.",
3711
+ "string": "Das Feld :attribute darf nicht länger als :arg0 Zeichen sein."
3712
+ },
3713
+ "min": {
3714
+ "array": "Das Feld :attribute muss mindestens :arg0 Elemente enthalten.",
3715
+ "numeric": "Das Feld :attribute muss mindestens :arg0 sein.",
3716
+ "string": "Das Feld :attribute muss mindestens :arg0 Zeichen lang sein."
3717
+ },
3718
+ "mimes": "Das Feld :attribute muss eine Datei vom Typ :arg0: sein.",
3719
+ "not_equals": "Das Feld :attribute darf nicht gleich :arg0 sein.",
3720
+ "not_in": "Das ausgewählte Feld :attribute darf nicht in :arg0: enthalten sein.",
3721
+ "not_regex": "Das Format von :attribute ist ungültig.",
3722
+ "number": "Das Feld :attribute muss eine Zahl sein.",
3723
+ "phone_no": "Das Feld :attribute muss eine gültige Telefonnummer sein.",
3724
+ "range": "Das Feld :attribute muss zwischen :arg0 und :arg1 liegen.",
3725
+ "between": "Das :attribute muss zwischen :arg0 und :arg1 liegen, beide ausgeschlossen.",
3726
+ "regex": "Das Format von :attribute ist ungültig.",
3727
+ "required": "Das Feld :attribute ist erforderlich.",
3728
+ "required_if": "Das Feld :attribute ist erforderlich, wenn :arg0 gleich :arg1 ist.",
3729
+ "required_unless": "Das Feld :attribute ist erforderlich, es sei denn, :arg0 ist in :arg1: enthalten.",
3730
+ "required_with": "Das Feld :attribute ist erforderlich, wenn eines der Felder :arg0: vorhanden ist.",
3731
+ "required_with_all": "Das Feld :attribute ist erforderlich, wenn :arg0: vorhanden sind.",
3732
+ "required_without": "Das Feld :attribute ist erforderlich, wenn :arg0: nicht vorhanden ist.",
3733
+ "required_without_all": "Das Feld :attribute ist erforderlich, wenn keines der Felder :arg0: vorhanden ist.",
3734
+ "same": "Die Felder :attribute und :arg0 müssen übereinstimmen.",
3735
+ "size": "Das Feld :attribute darf höchstens :arg0 KB groß sein.",
3736
+ "starts_with": "Das Feld :attribute muss mit einem der folgenden Werte beginnen: :arg0",
3737
+ "string": "Das Feld :attribute muss eine Zeichenfolge sein.",
3738
+ "strength": "Das Feld :attribute ist nicht sicher genug.",
3739
+ "under": "Das Feld :attribute muss unter :arg0 liegen.",
3740
+ "url": "Das Format von :attribute ist ungültig.",
3741
+ "uuid": "Das Feld :attribute muss eine gültige UUID sein.",
3742
+ "unique": "Das Feld :attribute wird bereits verwendet.",
3743
+ "video": "Das Feld :attribute muss ein gültiges Video sein."
3744
+ };
3745
+
3746
+ var es = {
3747
+ "above": "El campo :attribute debe estar por encima de :arg0.",
3748
+ "accepted": "El campo :attribute debe ser aceptado.",
3749
+ "after": "El campo :attribute debe ser una fecha posterior a :arg0.",
3750
+ "alpha": "El campo :attribute solo puede contener letras.",
3751
+ "alpha_dash": "El campo :attribute solo puede contener letras, números, guiones y guiones bajos.",
3752
+ "alpha_numeric": "El campo :attribute solo puede contener letras y números.",
3753
+ "array": "El campo :attribute debe ser un arreglo.",
3754
+ "before": "El campo :attribute debe ser una fecha anterior a :arg0.",
3755
+ "boolean": "El campo :attribute debe ser verdadero o falso.",
3756
+ "confirmed": "La confirmación de :attribute no coincide.",
3757
+ "credit_card": "El campo :attribute debe ser un número de tarjeta de crédito válido.",
3758
+ "cvv": "El campo :attribute debe ser un número CVV válido.",
3759
+ "date": "El campo :attribute no es una fecha válida.",
3760
+ "date_format": "El campo :attribute no coincide con el formato :arg0.",
3761
+ "debit_card": "El campo :attribute debe ser un número de tarjeta de débito válido.",
3762
+ "different": "Los campos :attribute y :arg0 deben ser diferentes.",
3763
+ "dimension": "El campo :attribute tiene dimensiones de imagen no válidas.",
3764
+ "email": "El campo :attribute debe ser una dirección de correo electrónico válida.",
3765
+ "ends_with": "El campo :attribute debe terminar con uno de los siguientes valores :arg0:",
3766
+ "equals": "El campo :attribute debe ser igual a :arg0",
3767
+ "exists": "El :attribute seleccionado no es válido.",
3768
+ "image": "El campo :attribute debe ser una imagen válida.",
3769
+ "in": "El :attribute seleccionado debe estar entre :arg0:.",
3770
+ "includes": "El campo :attribute debe contener :arg0:.",
3771
+ "integer": "El campo :attribute debe ser un número entero.",
3772
+ "ip": "El campo :attribute debe ser una dirección IP válida.",
3773
+ "ipv4": "El campo :attribute debe ser una dirección IPv4 válida.",
3774
+ "ipv6": "El campo :attribute debe ser una dirección IPv6 válida.",
3775
+ "json": "El campo :attribute debe ser una cadena JSON válida.",
3776
+ "max": {
3777
+ "array": "El campo :attribute no debe tener más de :arg0 elementos.",
3778
+ "numeric": "El campo :attribute no debe ser mayor que :arg0.",
3779
+ "string": "El campo :attribute no debe tener más de :arg0 caracteres."
3780
+ },
3781
+ "min": {
3782
+ "array": "El campo :attribute debe tener al menos :arg0 elementos.",
3783
+ "numeric": "El campo :attribute debe ser al menos :arg0.",
3784
+ "string": "El campo :attribute debe tener al menos :arg0 caracteres."
3785
+ },
3786
+ "mimes": "El campo :attribute debe ser un archivo de tipo :arg0:.",
3787
+ "not_equals": "El campo :attribute no debe ser igual a :arg0",
3788
+ "not_in": "El :attribute seleccionado no debe estar entre :arg0:.",
3789
+ "not_regex": "El formato de :attribute no es válido.",
3790
+ "number": "El campo :attribute debe ser un número.",
3791
+ "phone_no": "El campo :attribute debe ser un número de teléfono válido.",
3792
+ "range": "El campo :attribute debe estar entre :arg0 y :arg1.",
3793
+ "between": "El :attribute debe estar entre :arg0 y :arg1, ambos exclusivos.",
3794
+ "regex": "El formato de :attribute no es válido.",
3795
+ "required": "El campo :attribute es obligatorio.",
3796
+ "required_if": "El campo :attribute es obligatorio cuando :arg0 es :arg1.",
3797
+ "required_unless": "El campo :attribute es obligatorio a menos que :arg0 esté en :arg1:.",
3798
+ "required_with": "El campo :attribute es obligatorio cuando alguno de :arg0: está presente.",
3799
+ "required_with_all": "El campo :attribute es obligatorio cuando :arg0: están presentes.",
3800
+ "required_without": "El campo :attribute es obligatorio cuando :arg0: no está presente.",
3801
+ "required_without_all": "El campo :attribute es obligatorio cuando ninguno de :arg0: está presente.",
3802
+ "same": "Los campos :attribute y :arg0 deben coincidir.",
3803
+ "size": "El campo :attribute debe ser :arg0 KB o menos.",
3804
+ "starts_with": "El campo :attribute debe comenzar con uno de los siguientes valores :arg0",
3805
+ "string": "El campo :attribute debe ser una cadena de texto.",
3806
+ "strength": "El campo :attribute no es lo suficientemente seguro.",
3807
+ "under": "El campo :attribute debe ser menor que :arg0.",
3808
+ "url": "El formato de :attribute no es válido.",
3809
+ "uuid": "El campo :attribute debe ser un UUID válido.",
3810
+ "unique": "El campo :attribute ya ha sido registrado.",
3811
+ "video": "El campo :attribute debe ser un video válido."
3812
+ };
3813
+
3814
+ var fr = {
3815
+ "above": "Le champ :attribute doit être supérieur à :arg0.",
3816
+ "accepted": "Le champ :attribute doit être accepté.",
3817
+ "after": "Le champ :attribute doit être une date postérieure à :arg0.",
3818
+ "alpha": "Le champ :attribute ne peut contenir que des lettres.",
3819
+ "alpha_dash": "Le champ :attribute ne peut contenir que des lettres, des chiffres, des tirets et des underscores.",
3820
+ "alpha_numeric": "Le champ :attribute ne peut contenir que des lettres et des chiffres.",
3821
+ "array": "Le champ :attribute doit être un tableau.",
3822
+ "before": "Le champ :attribute doit être une date antérieure à :arg0.",
3823
+ "boolean": "Le champ :attribute doit être vrai ou faux.",
3824
+ "confirmed": "La confirmation de :attribute ne correspond pas.",
3825
+ "credit_card": "Le champ :attribute doit être un numéro de carte de crédit valide.",
3826
+ "cvv": "Le champ :attribute doit être un numéro CVV valide.",
3827
+ "date": "Le champ :attribute n'est pas une date valide.",
3828
+ "date_format": "Le champ :attribute ne correspond pas au format :arg0.",
3829
+ "debit_card": "Le champ :attribute doit être un numéro de carte de débit valide.",
3830
+ "different": "Les champs :attribute et :arg0 doivent être différents.",
3831
+ "dimension": "Le champ :attribute a des dimensions d'image non valides.",
3832
+ "email": "Le champ :attribute doit être une adresse e-mail valide.",
3833
+ "ends_with": "Le champ :attribute doit se terminer par l'une des valeurs suivantes :arg0:",
3834
+ "equals": "Le champ :attribute doit être égal à :arg0",
3835
+ "exists": "Le champ :attribute sélectionné n'est pas valide.",
3836
+ "image": "Le champ :attribute doit être une image valide.",
3837
+ "in": "Le champ :attribute sélectionné doit figurer parmi :arg0:.",
3838
+ "includes": "Le champ :attribute doit contenir :arg0:.",
3839
+ "integer": "Le champ :attribute doit être un entier.",
3840
+ "ip": "Le champ :attribute doit être une adresse IP valide.",
3841
+ "ipv4": "Le champ :attribute doit être une adresse IPv4 valide.",
3842
+ "ipv6": "Le champ :attribute doit être une adresse IPv6 valide.",
3843
+ "json": "Le champ :attribute doit être une chaîne JSON valide.",
3844
+ "max": {
3845
+ "array": "Le champ :attribute ne peut pas avoir plus de :arg0 éléments.",
3846
+ "numeric": "Le champ :attribute ne peut pas être supérieur à :arg0.",
3847
+ "string": "Le champ :attribute ne peut pas dépasser :arg0 caractères."
3848
+ },
3849
+ "min": {
3850
+ "array": "Le champ :attribute doit contenir au moins :arg0 éléments.",
3851
+ "numeric": "Le champ :attribute doit être d'au moins :arg0.",
3852
+ "string": "Le champ :attribute doit contenir au moins :arg0 caractères."
3853
+ },
3854
+ "mimes": "Le champ :attribute doit être un fichier de type :arg0:.",
3855
+ "not_equals": "Le champ :attribute ne doit pas être égal à :arg0",
3856
+ "not_in": "Le champ :attribute sélectionné ne doit pas figurer parmi :arg0:.",
3857
+ "not_regex": "Le format de :attribute n'est pas valide.",
3858
+ "number": "Le champ :attribute doit être un nombre.",
3859
+ "phone_no": "Le champ :attribute doit être un numéro de téléphone valide.",
3860
+ "range": "Le champ :attribute doit être compris entre :arg0 et :arg1.",
3861
+ "between": "Le :attribute doit être compris entre :arg0 et :arg1, exclusivement.",
3862
+ "regex": "Le format de :attribute n'est pas valide.",
3863
+ "required": "Le champ :attribute est obligatoire.",
3864
+ "required_if": "Le champ :attribute est obligatoire lorsque :arg0 est :arg1.",
3865
+ "required_unless": "Le champ :attribute est obligatoire à moins que :arg0 ne soit dans :arg1:.",
3866
+ "required_with": "Le champ :attribute est obligatoire lorsque l'un des champs :arg0: est présent.",
3867
+ "required_with_all": "Le champ :attribute est obligatoire lorsque :arg0: sont présents.",
3868
+ "required_without": "Le champ :attribute est obligatoire lorsque :arg0: n'est pas présent.",
3869
+ "required_without_all": "Le champ :attribute est obligatoire lorsque aucun des champs :arg0: n'est présent.",
3870
+ "same": "Les champs :attribute et :arg0 doivent correspondre.",
3871
+ "size": "Le champ :attribute doit faire :arg0 Ko ou moins.",
3872
+ "starts_with": "Le champ :attribute doit commencer par l'une des valeurs suivantes :arg0",
3873
+ "string": "Le champ :attribute doit être une chaîne de caractères.",
3874
+ "strength": "Le champ :attribute n'est pas assez sécurisé.",
3875
+ "under": "Le champ :attribute doit être inférieur à :arg0.",
3876
+ "url": "Le format de :attribute n'est pas valide.",
3877
+ "uuid": "Le champ :attribute doit être un UUID valide.",
3878
+ "unique": "Le champ :attribute est déjà utilisé.",
3879
+ "video": "Le champ :attribute doit être une vidéo valide."
3880
+ };
3881
+
3882
+ var hi = {
3883
+ "above": ":attribute, :arg0 से अधिक होना चाहिए।",
3884
+ "accepted": ":attribute को स्वीकार करना आवश्यक है।",
3885
+ "after": ":attribute की तारीख :arg0 के बाद की होनी चाहिए।",
3886
+ "alpha": ":attribute में केवल अक्षर होने चाहिए।",
3887
+ "alpha_dash": ":attribute में केवल अक्षर, अंक, डैश (-) और अंडरस्कोर (_) होने चाहिए।",
3888
+ "alpha_numeric": ":attribute में केवल अक्षर और अंक होने चाहिए।",
3889
+ "array": ":attribute एक ऐरे (array) होना चाहिए।",
3890
+ "before": ":attribute की तारीख :arg0 से पहले की होनी चाहिए।",
3891
+ "boolean": ":attribute का मान true या false होना चाहिए।",
3892
+ "confirmed": ":attribute की पुष्टि मेल नहीं खाती।",
3893
+ "credit_card": ":attribute एक मान्य क्रेडिट कार्ड नंबर होना चाहिए।",
3894
+ "cvv": ":attribute एक मान्य CVV नंबर होना चाहिए।",
3895
+ "date": ":attribute एक मान्य तारीख नहीं है।",
3896
+ "date_format": ":attribute प्रारूप :arg0 से मेल नहीं खाता।",
3897
+ "debit_card": ":attribute एक मान्य डेबिट कार्ड नंबर होना चाहिए।",
3898
+ "different": ":attribute और :arg0 अलग-अलग होने चाहिए।",
3899
+ "dimension": ":attribute की इमेज डाइमेंशन मान्य नहीं है।",
3900
+ "email": ":attribute एक मान्य ईमेल पता होना चाहिए।",
3901
+ "ends_with": ":attribute निम्न में से किसी एक के साथ समाप्त होना चाहिए: :arg0:",
3902
+ "equals": ":attribute का मान :arg0 के बराबर होना चाहिए।",
3903
+ "exists": "चयनित :attribute मान्य नहीं है।",
3904
+ "image": ":attribute एक मान्य इमेज होनी चाहिए।",
3905
+ "in": "चयनित :attribute, :arg0: में से एक होना चाहिए।",
3906
+ "includes": ":attribute में :arg0: शामिल होना चाहिए।",
3907
+ "integer": ":attribute एक पूर्णांक (integer) होना चाहिए।",
3908
+ "ip": ":attribute एक मान्य IP पता होना चाहिए।",
3909
+ "ipv4": ":attribute एक मान्य IPv4 पता होना चाहिए।",
3910
+ "ipv6": ":attribute एक मान्य IPv6 पता होना चाहिए।",
3911
+ "json": ":attribute एक मान्य JSON स्ट्रिंग होनी चाहिए।",
3912
+ "max": {
3913
+ "array": ":attribute में :arg0 से अधिक आइटम नहीं होने चाहिए।",
3914
+ "numeric": ":attribute, :arg0 से अधिक नहीं होना चाहिए।",
3915
+ "string": ":attribute, :arg0 वर्णों से अधिक नहीं होना चाहिए।"
3916
+ },
3917
+ "min": {
3918
+ "array": ":attribute में कम से कम :arg0 आइटम होने चाहिए।",
3919
+ "numeric": ":attribute कम से कम :arg0 होना चाहिए।",
3920
+ "string": ":attribute में कम से कम :arg0 वर्ण होने चाहिए।"
3921
+ },
3922
+ "mimes": ":attribute, :arg0: प्रकार की फ़ाइल होनी चाहिए।",
3923
+ "not_equals": ":attribute का मान :arg0 के बराबर नहीं होना चाहिए।",
3924
+ "not_in": "चयनित :attribute, :arg0: में से नहीं होना चाहिए।",
3925
+ "not_regex": ":attribute का प्रारूप अमान्य है।",
3926
+ "number": ":attribute एक संख्या होनी चाहिए।",
3927
+ "phone_no": ":attribute एक मान्य फ़ोन नंबर होना चाहिए।",
3928
+ "range": ":attribute, :arg0 और :arg1 के बीच होना चाहिए।",
3929
+ "between": ":attribute अवश्य :arg0 और :arg1 के बीच होना चाहिए, दोनों को छोड़कर।",
3930
+ "regex": ":attribute का प्रारूप अमान्य है।",
3931
+ "required": ":attribute फ़ील्ड आवश्यक है।",
3932
+ "required_if": "जब :arg0, :arg1 हो, तब :attribute फ़ील्ड आवश्यक है।",
3933
+ "required_unless": ":attribute फ़ील्ड आवश्यक है, जब तक :arg0, :arg1: में न हो।",
3934
+ "required_with": "जब :arg0: में से कोई मौजूद हो, तब :attribute फ़ील्ड आवश्यक है।",
3935
+ "required_with_all": "जब :arg0: मौजूद हों, तब :attribute फ़ील्ड आवश्यक है।",
3936
+ "required_without": "जब :arg0: मौजूद न हो, तब :attribute फ़ील्ड आवश्यक है।",
3937
+ "required_without_all": "जब :arg0: में से कोई भी मौजूद न हो, तब :attribute फ़ील्ड आवश्यक है।",
3938
+ "same": ":attribute और :arg0 एक समान होने चाहिए।",
3939
+ "size": ":attribute अधिकतम :arg0 KB का होना चाहिए।",
3940
+ "starts_with": ":attribute निम्न में से किसी एक से शुरू होना चाहिए: :arg0",
3941
+ "string": ":attribute एक स्ट्रिंग (string) होनी चाहिए।",
3942
+ "strength": ":attribute पर्याप्त मज़बूत नहीं है।",
3943
+ "under": ":attribute, :arg0 से कम होना चाहिए।",
3944
+ "url": ":attribute का प्रारूप अमान्य है।",
3945
+ "uuid": ":attribute एक मान्य UUID होना चाहिए।",
3946
+ "unique": ":attribute पहले से ही उपयोग में है।",
3947
+ "video": ":attribute एक मान्य वीडियो होनी चाहिए।"
3948
+ };
3949
+
3950
+ var bn = {
3951
+ "above": ":attribute অবশ্যই :arg0-এর বেশি হতে হবে।",
3952
+ "accepted": ":attribute অবশ্যই গ্রহণ করতে হবে।",
3953
+ "after": ":attribute অবশ্যই :arg0-এর পরের একটি তারিখ হতে হবে।",
3954
+ "alpha": ":attribute-এ শুধুমাত্র অক্ষর থাকতে পারে।",
3955
+ "alpha_dash": ":attribute-এ শুধুমাত্র অক্ষর, সংখ্যা, ড্যাশ (-) এবং আন্ডারস্কোর (_) থাকতে পারে।",
3956
+ "alpha_numeric": ":attribute-এ শুধুমাত্র অক্ষর এবং সংখ্যা থাকতে পারে।",
3957
+ "array": ":attribute অবশ্যই একটি অ্যারে (array) হতে হবে।",
3958
+ "before": ":attribute অবশ্যই :arg0-এর আগের একটি তারিখ হতে হবে।",
3959
+ "boolean": ":attribute ফিল্ডটি অবশ্যই true অথবা false হতে হবে।",
3960
+ "confirmed": ":attribute কনফার্মেশন মিলছে না।",
3961
+ "credit_card": ":attribute অবশ্যই একটি বৈধ ক্রেডিট কার্ড নম্বর হতে হবে।",
3962
+ "cvv": ":attribute অবশ্যই একটি বৈধ CVV নম্বর হতে হবে।",
3963
+ "date": ":attribute একটি বৈধ তারিখ নয়।",
3964
+ "date_format": ":attribute ফরম্যাট :arg0-এর সাথে মিলছে না।",
3965
+ "debit_card": ":attribute অবশ্যই একটি বৈধ ডেবিট কার্ড নম্বর হতে হবে।",
3966
+ "different": ":attribute এবং :arg0 অবশ্যই আলাদা হতে হবে।",
3967
+ "dimension": ":attribute-এর ইমেজ ডাইমেনশন সঠিক নয়।",
3968
+ "email": ":attribute অবশ্যই একটি বৈধ ইমেইল ঠিকানা হতে হবে।",
3969
+ "ends_with": ":attribute অবশ্যই নিম্নলিখিত :arg0: এর মধ্যে যেকোনো একটি দিয়ে শেষ হতে হবে",
3970
+ "equals": ":attribute অবশ্যই :arg0-এর সমান হতে হবে",
3971
+ "exists": "নির্বাচিত :attribute অবৈধ।",
3972
+ "image": ":attribute অবশ্যই একটি বৈধ ইমেজ হতে হবে।",
3973
+ "in": "নির্বাচিত :attribute অবশ্যই :arg0:-এর মধ্যে থাকতে হবে।",
3974
+ "includes": ":attribute-তে অবশ্যই :arg0: থাকতে হবে।",
3975
+ "integer": ":attribute অবশ্যই একটি পূর্ণসংখ্যা (integer) হতে হবে।",
3976
+ "ip": ":attribute অবশ্যই একটি বৈধ IP ঠিকানা হতে হবে।",
3977
+ "ipv4": ":attribute অবশ্যই একটি বৈধ IPv4 ঠিকানা হতে হবে।",
3978
+ "ipv6": ":attribute অবশ্যই একটি বৈধ IPv6 ঠিকানা হতে হবে।",
3979
+ "json": ":attribute অবশ্যই একটি বৈধ JSON স্ট্রিং হতে হবে।",
3980
+ "max": {
3981
+ "array": ":attribute-এ :arg0-এর বেশি আইটেম থাকতে পারবে না।",
3982
+ "numeric": ":attribute অবশ্যই :arg0-এর বেশি হতে পারবে না।",
3983
+ "string": ":attribute অবশ্যই :arg0 অক্ষরের বেশি হতে পারবে না।"
3984
+ },
3985
+ "min": {
3986
+ "array": ":attribute-এ অবশ্যই কমপক্ষে :arg0টি আইটেম থাকতে হবে।",
3987
+ "numeric": ":attribute অবশ্যই কমপক্ষে :arg0 হতে হবে।",
3988
+ "string": ":attribute অবশ্যই কমপক্ষে :arg0 অক্ষরের হতে হবে।"
3989
+ },
3990
+ "mimes": ":attribute অবশ্যই :arg0: টাইপের একটি ফাইল হতে হবে।",
3991
+ "not_equals": ":attribute অবশ্যই :arg0-এর সমান হতে পারবে না",
3992
+ "not_in": "নির্বাচিত :attribute অবশ্যই :arg0:-এর মধ্যে থাকতে পারবে না।",
3993
+ "not_regex": ":attribute ফরম্যাট অবৈধ।",
3994
+ "number": ":attribute অবশ্যই একটি সংখ্যা হতে হবে।",
3995
+ "phone_no": ":attribute অবশ্যই একটি বৈধ ফোন নম্বর হতে হবে।",
3996
+ "range": ":attribute অবশ্যই :arg0 এবং :arg1-এর মধ্যে হতে হবে।",
3997
+ "between": ":attribute অবশ্যই :arg0 এবং :arg1-এর মধ্যে হতে হবে, উভয়ই বাদ দিয়ে।",
3998
+ "regex": ":attribute ফরম্যাট অবৈধ।",
3999
+ "required": ":attribute ফিল্ডটি আবশ্যক।",
4000
+ "required_if": "যখন :arg0 হলো :arg1, তখন :attribute ফিল্ডটি আবশ্যক।",
4001
+ "required_unless": ":attribute ফিল্ডটি আবশ্যক, যদি না :arg0, :arg1:-এর মধ্যে থাকে।",
4002
+ "required_with": "যখন :arg0: এর মধ্যে যেকোনো একটি উপস্থিত থাকে, তখন :attribute ফিল্ডটি আবশ্যক।",
4003
+ "required_with_all": "যখন :arg0: উপস্থিত থাকে, তখন :attribute ফিল্ডটি আবশ্যক।",
4004
+ "required_without": "যখন :arg0: উপস্থিত না থাকে, তখন :attribute ফিল্ডটি আবশ্যক।",
4005
+ "required_without_all": "যখন :arg0: এর কোনোটিই উপস্থিত না থাকে, তখন :attribute ফিল্ডটি আবশ্যক।",
4006
+ "same": ":attribute এবং :arg0 অবশ্যই মিলতে হবে।",
4007
+ "size": ":attribute অবশ্যই :arg0 KB অথবা তার কম হতে হবে।",
4008
+ "starts_with": ":attribute অবশ্যই নিম্নলিখিত :arg0 এর মধ্যে যেকোনো একটি দিয়ে শুরু হতে হবে",
4009
+ "string": ":attribute অবশ্যই একটি স্ট্রিং (string) হতে হবে।",
4010
+ "strength": ":attribute যথেষ্ট শক্তিশালী নয়।",
4011
+ "under": ":attribute অবশ্যই :arg0-এর কম হতে হবে।",
4012
+ "url": ":attribute ফরম্যাট অবৈধ।",
4013
+ "uuid": ":attribute অবশ্যই একটি বৈধ UUID হতে হবে।",
4014
+ "unique": ":attribute ইতিমধ্যে ব্যবহৃত হয়েছে।",
4015
+ "video": ":attribute অবশ্যই একটি বৈধ ভিডিও হতে হবে।"
4016
+ };
4017
+
4018
+ var pt = {
4019
+ "above": "O campo :attribute deve estar acima de :arg0.",
4020
+ "accepted": "O campo :attribute deve ser aceito.",
4021
+ "after": "O campo :attribute deve ser uma data posterior a :arg0.",
4022
+ "alpha": "O campo :attribute pode conter apenas letras.",
4023
+ "alpha_dash": "O campo :attribute pode conter apenas letras, números, hífens e sublinhados.",
4024
+ "alpha_numeric": "O campo :attribute pode conter apenas letras e números.",
4025
+ "array": "O campo :attribute deve ser uma matriz (array).",
4026
+ "before": "O campo :attribute deve ser uma data anterior a :arg0.",
4027
+ "boolean": "O campo :attribute deve ser verdadeiro ou falso.",
4028
+ "confirmed": "A confirmação de :attribute não coincide.",
4029
+ "credit_card": "O campo :attribute deve ser um número de cartão de crédito válido.",
4030
+ "cvv": "O campo :attribute deve ser um número de CVV válido.",
4031
+ "date": "O campo :attribute não é uma data válida.",
4032
+ "date_format": "O campo :attribute não corresponde ao formato :arg0.",
4033
+ "debit_card": "O campo :attribute deve ser um número de cartão de débito válido.",
4034
+ "different": "Os campos :attribute e :arg0 devem ser diferentes.",
4035
+ "dimension": "O campo :attribute tem dimensões de imagem inválidas.",
4036
+ "email": "O campo :attribute deve ser um endereço de e-mail válido.",
4037
+ "ends_with": "O campo :attribute deve terminar com um dos seguintes valores :arg0:",
4038
+ "equals": "O campo :attribute deve ser igual a :arg0",
4039
+ "exists": "O :attribute selecionado é inválido.",
4040
+ "image": "O campo :attribute deve ser uma imagem válida.",
4041
+ "in": "O :attribute selecionado deve estar entre :arg0:.",
4042
+ "includes": "O campo :attribute deve conter :arg0:.",
4043
+ "integer": "O campo :attribute deve ser um número inteiro.",
4044
+ "ip": "O campo :attribute deve ser um endereço IP válido.",
4045
+ "ipv4": "O campo :attribute deve ser um endereço IPv4 válido.",
4046
+ "ipv6": "O campo :attribute deve ser um endereço IPv6 válido.",
4047
+ "json": "O campo :attribute deve ser uma string JSON válida.",
4048
+ "max": {
4049
+ "array": "O campo :attribute não pode ter mais de :arg0 itens.",
4050
+ "numeric": "O campo :attribute não pode ser maior que :arg0.",
4051
+ "string": "O campo :attribute não pode ter mais de :arg0 caracteres."
4052
+ },
4053
+ "min": {
4054
+ "array": "O campo :attribute deve ter pelo menos :arg0 itens.",
4055
+ "numeric": "O campo :attribute deve ser pelo menos :arg0.",
4056
+ "string": "O campo :attribute deve ter pelo menos :arg0 caracteres."
4057
+ },
4058
+ "mimes": "O campo :attribute deve ser um arquivo do tipo :arg0:.",
4059
+ "not_equals": "O campo :attribute não deve ser igual a :arg0",
4060
+ "not_in": "O :attribute selecionado não deve estar entre :arg0:.",
4061
+ "not_regex": "O formato de :attribute é inválido.",
4062
+ "number": "O campo :attribute deve ser um número.",
4063
+ "phone_no": "O campo :attribute deve ser um número de telefone válido.",
4064
+ "range": "O campo :attribute deve estar entre :arg0 e :arg1.",
4065
+ "between": "O campo :attribute deve estar entre :arg0 e :arg1, exclusive.",
4066
+ "regex": "O formato de :attribute é inválido.",
4067
+ "required": "O campo :attribute é obrigatório.",
4068
+ "required_if": "O campo :attribute é obrigatório quando :arg0 é :arg1.",
4069
+ "required_unless": "O campo :attribute é obrigatório, a menos que :arg0 esteja em :arg1:.",
4070
+ "required_with": "O campo :attribute é obrigatório quando algum de :arg0: está presente.",
4071
+ "required_with_all": "O campo :attribute é obrigatório quando :arg0: estão presentes.",
4072
+ "required_without": "O campo :attribute é obrigatório quando :arg0: não está presente.",
4073
+ "required_without_all": "O campo :attribute é obrigatório quando nenhum de :arg0: está presente.",
4074
+ "same": "Os campos :attribute e :arg0 devem coincidir.",
4075
+ "size": "O campo :attribute deve ter :arg0 KB ou menos.",
4076
+ "starts_with": "O campo :attribute deve começar com um dos seguintes valores :arg0",
4077
+ "string": "O campo :attribute deve ser uma string.",
4078
+ "strength": "O campo :attribute não é forte o suficiente.",
4079
+ "under": "O campo :attribute deve ser menor que :arg0.",
4080
+ "url": "O formato de :attribute é inválido.",
4081
+ "uuid": "O campo :attribute deve ser um UUID válido.",
4082
+ "unique": "O campo :attribute já foi registrado.",
4083
+ "video": "O campo :attribute deve ser um vídeo válido."
4084
+ };
4085
+
4086
+ var ja = {
4087
+ above: ':attributeは:arg0より大きい必要があります。',
4088
+ accepted: ':attributeを承認する必要があります。',
4089
+ after: ':attributeは:arg0より後の日付である必要があります。',
4090
+ alpha: ':attributeには英字のみ使用できます。',
4091
+ alpha_dash: ':attributeには英字、数字、ハイフン、アンダースコアのみ使用できます。',
4092
+ alpha_numeric: ':attributeには英字と数字のみ使用できます。',
4093
+ array: ':attributeは配列である必要があります。',
4094
+ before: ':attributeは:arg0より前の日付である必要があります。',
4095
+ boolean: ':attributeフィールドはtrueまたはfalseである必要があります。',
4096
+ confirmed: ':attributeの確認が一致しません。',
4097
+ credit_card: ':attributeは有効なクレジットカード番号である必要があります。',
4098
+ cvv: ':attributeは有効なCVV番号である必要があります。',
4099
+ date: ':attributeは有効な日付ではありません。',
4100
+ date_format: ':attributeはフォーマット:arg0と一致しません。',
4101
+ debit_card: ':attributeは有効なデビットカード番号である必要があります。',
4102
+ different: ':attributeと:arg0は異なる必要があります。',
4103
+ dimension: ':attributeの画像サイズが無効です。',
4104
+ email: ':attributeは有効なメールアドレスである必要があります。',
4105
+ ends_with: ':attributeは次のいずれかで終わる必要があります: :arg0',
4106
+ equals: ':attributeは:arg0と等しい必要があります',
4107
+ exists: '選択された:attributeは無効です。',
4108
+ image: ':attributeは有効な画像である必要があります。',
4109
+ in: '選択された:attributeは:arg0のいずれかである必要があります。',
4110
+ includes: ':attributeには:arg0を含める必要があります。',
4111
+ integer: ':attributeは整数である必要があります。',
4112
+ ip: ':attributeは有効なIPアドレスである必要があります。',
4113
+ ipv4: ':attributeは有効なIPv4アドレスである必要があります。',
4114
+ ipv6: ':attributeは有効なIPv6アドレスである必要があります。',
4115
+ json: ':attributeは有効なJSON文字列である必要があります。',
4116
+ max: {
4117
+ array: ':attributeは:arg0個を超える項目を含めることはできません。',
4118
+ numeric: ':attributeは:arg0より大きくすることはできません。',
4119
+ string: ':attributeは:arg0文字を超えることはできません。'
4120
+ },
4121
+ min: {
4122
+ array: ':attributeは少なくとも:arg0個の項目を含める必要があります。',
4123
+ numeric: ':attributeは少なくとも:arg0である必要があります。',
4124
+ string: ':attributeは少なくとも:arg0文字である必要があります。'
4125
+ },
4126
+ mimes: ':attributeは:arg0タイプのファイルである必要があります。',
4127
+ not_equals: ':attributeは:arg0と等しくない必要があります',
4128
+ not_in: '選択された:attributeは:arg0に含まれてはいけません。',
4129
+ not_regex: ':attributeの形式が無効です。',
4130
+ number: ':attributeは数値である必要があります。',
4131
+ phone_no: ':attributeは有効な電話番号である必要があります。',
4132
+ range: ':attributeは:arg0から:arg1の間である必要があります。',
4133
+ between: ':attributeは:arg0と:arg1の間(両端を含まない)である必要があります。',
4134
+ regex: ':attributeの形式が無効です。',
4135
+ required: ':attributeフィールドは必須です。',
4136
+ required_if: ':arg0が:arg1の場合、:attributeフィールドは必須です。',
4137
+ required_unless: ':arg0が:arg1に含まれない限り、:attributeフィールドは必須です。',
4138
+ required_with: ':arg0のいずれかが存在する場合、:attributeフィールドは必須です。',
4139
+ required_with_all: ':arg0が存在する場合、:attributeフィールドは必須です。',
4140
+ required_without: ':arg0が存在しない場合、:attributeフィールドは必須です。',
4141
+ required_without_all: ':arg0のいずれも存在しない場合、:attributeフィールドは必須です。',
4142
+ same: ':attributeと:arg0は一致する必要があります。',
4143
+ size: ':attributeは:arg0KB以下である必要があります。',
4144
+ starts_with: ':attributeは次のいずれかで始まる必要があります: :arg0',
4145
+ string: ':attributeは文字列である必要があります。',
4146
+ strength: ':attributeの強度が十分ではありません。',
4147
+ under: ':attributeは:arg0未満である必要があります。',
4148
+ url: ':attributeの形式が無効です。',
4149
+ uuid: ':attributeは有効なUUIDである必要があります。',
4150
+ unique: ':attributeはすでに使用されています。',
4151
+ video: ':attributeは有効な動画である必要があります。',
4152
+ };
4153
+
4154
+ var zh = {
4155
+ above: ':attributeは:arg0より大きい必要があります。',
4156
+ accepted: ':attributeを承認する必要があります。',
4157
+ after: ':attributeは:arg0より後の日付である必要があります。',
4158
+ alpha: ':attributeには英字のみ使用できます。',
4159
+ alpha_dash: ':attributeには英字、数字、ハイフン、アンダースコアのみ使用できます。',
4160
+ alpha_numeric: ':attributeには英字と数字のみ使用できます。',
4161
+ array: ':attributeは配列である必要があります。',
4162
+ before: ':attributeは:arg0より前の日付である必要があります。',
4163
+ boolean: ':attributeフィールドはtrueまたはfalseである必要があります。',
4164
+ confirmed: ':attributeの確認が一致しません。',
4165
+ credit_card: ':attributeは有効なクレジットカード番号である必要があります。',
4166
+ cvv: ':attributeは有効なCVV番号である必要があります。',
4167
+ date: ':attributeは有効な日付ではありません。',
4168
+ date_format: ':attributeはフォーマット:arg0と一致しません。',
4169
+ debit_card: ':attributeは有効なデビットカード番号である必要があります。',
4170
+ different: ':attributeと:arg0は異なる必要があります。',
4171
+ dimension: ':attributeの画像サイズが無効です。',
4172
+ email: ':attributeは有効なメールアドレスである必要があります。',
4173
+ ends_with: ':attributeは次のいずれかで終わる必要があります: :arg0',
4174
+ equals: ':attributeは:arg0と等しい必要があります',
4175
+ exists: '選択された:attributeは無効です。',
4176
+ image: ':attributeは有効な画像である必要があります。',
4177
+ in: '選択された:attributeは:arg0のいずれかである必要があります。',
4178
+ includes: ':attributeには:arg0を含める必要があります。',
4179
+ integer: ':attributeは整数である必要があります。',
4180
+ ip: ':attributeは有効なIPアドレスである必要があります。',
4181
+ ipv4: ':attributeは有効なIPv4アドレスである必要があります。',
4182
+ ipv6: ':attributeは有効なIPv6アドレスである必要があります。',
4183
+ json: ':attributeは有効なJSON文字列である必要があります。',
4184
+ max: {
4185
+ array: ':attributeは:arg0個を超える項目を含めることはできません。',
4186
+ numeric: ':attributeは:arg0より大きくすることはできません。',
4187
+ string: ':attributeは:arg0文字を超えることはできません。'
4188
+ },
4189
+ min: {
4190
+ array: ':attributeは少なくとも:arg0個の項目を含める必要があります。',
4191
+ numeric: ':attributeは少なくとも:arg0である必要があります。',
4192
+ string: ':attributeは少なくとも:arg0文字である必要があります。'
4193
+ },
4194
+ mimes: ':attributeは:arg0タイプのファイルである必要があります。',
4195
+ not_equals: ':attributeは:arg0と等しくない必要があります',
4196
+ not_in: '選択された:attributeは:arg0に含まれてはいけません。',
4197
+ not_regex: ':attributeの形式が無効です。',
4198
+ number: ':attributeは数値である必要があります。',
4199
+ phone_no: ':attributeは有効な電話番号である必要があります。',
4200
+ range: ':attributeは:arg0から:arg1の間である必要があります。',
4201
+ between: ':attributeは:arg0と:arg1の間(両端を含まない)である必要があります。',
4202
+ regex: ':attributeの形式が無効です。',
4203
+ required: ':attributeフィールドは必須です。',
4204
+ required_if: ':arg0が:arg1の場合、:attributeフィールドは必須です。',
4205
+ required_unless: ':arg0が:arg1に含まれない限り、:attributeフィールドは必須です。',
4206
+ required_with: ':arg0のいずれかが存在する場合、:attributeフィールドは必須です。',
4207
+ required_with_all: ':arg0が存在する場合、:attributeフィールドは必須です。',
4208
+ required_without: ':arg0が存在しない場合、:attributeフィールドは必須です。',
4209
+ required_without_all: ':arg0のいずれも存在しない場合、:attributeフィールドは必須です。',
4210
+ same: ':attributeと:arg0は一致する必要があります。',
4211
+ size: ':attributeは:arg0KB以下である必要があります。',
4212
+ starts_with: ':attributeは次のいずれかで始まる必要があります: :arg0',
4213
+ string: ':attributeは文字列である必要があります。',
4214
+ strength: ':attributeの強度が十分ではありません。',
4215
+ under: ':attributeは:arg0未満である必要があります。',
4216
+ url: ':attributeの形式が無効です。',
4217
+ uuid: ':attributeは有効なUUIDである必要があります。',
4218
+ unique: ':attributeはすでに使用されています。',
4219
+ video: ':attributeは有効な動画である必要があります。',
4220
+ };
4221
+
4222
+ var ru = {
4223
+ above: 'Поле :attribute должно быть больше :arg0.',
4224
+ accepted: 'Поле :attribute должно быть принято.',
4225
+ after: 'Поле :attribute должно быть датой позже :arg0.',
4226
+ alpha: 'Поле :attribute может содержать только буквы.',
4227
+ alpha_dash: 'Поле :attribute может содержать только буквы, цифры, дефисы и подчёркивания.',
4228
+ alpha_numeric: 'Поле :attribute может содержать только буквы и цифры.',
4229
+ array: 'Поле :attribute должно быть массивом.',
4230
+ before: 'Поле :attribute должно быть датой раньше :arg0.',
4231
+ boolean: 'Поле :attribute должно быть true или false.',
4232
+ confirmed: 'Подтверждение :attribute не совпадает.',
4233
+ credit_card: 'Поле :attribute должно быть действительным номером кредитной карты.',
4234
+ cvv: 'Поле :attribute должно быть действительным номером CVV.',
4235
+ date: 'Поле :attribute не является допустимой датой.',
4236
+ date_format: 'Поле :attribute не соответствует формату :arg0.',
4237
+ debit_card: 'Поле :attribute должно быть действительным номером дебетовой карты.',
4238
+ different: 'Поля :attribute и :arg0 должны отличаться.',
4239
+ dimension: 'Поле :attribute имеет недопустимые размеры изображения.',
4240
+ email: 'Поле :attribute должно быть действительным адресом электронной почты.',
4241
+ ends_with: 'Поле :attribute должно заканчиваться одним из следующих значений: :arg0',
4242
+ equals: 'Поле :attribute должно быть равно :arg0',
4243
+ exists: 'Выбранное значение :attribute недопустимо.',
4244
+ image: 'Поле :attribute должно быть действительным изображением.',
4245
+ in: 'Выбранное значение :attribute должно входить в :arg0.',
4246
+ includes: 'Поле :attribute должно содержать :arg0.',
4247
+ integer: 'Поле :attribute должно быть целым числом.',
4248
+ ip: 'Поле :attribute должно быть действительным IP-адресом.',
4249
+ ipv4: 'Поле :attribute должно быть действительным адресом IPv4.',
4250
+ ipv6: 'Поле :attribute должно быть действительным адресом IPv6.',
4251
+ json: 'Поле :attribute должно быть допустимой строкой JSON.',
4252
+ max: {
4253
+ array: 'Поле :attribute не должно содержать более :arg0 элементов.',
4254
+ numeric: 'Поле :attribute не должно быть больше :arg0.',
4255
+ string: 'Поле :attribute не должно быть длиннее :arg0 символов.'
4256
+ },
4257
+ min: {
4258
+ array: 'Поле :attribute должно содержать не менее :arg0 элементов.',
4259
+ numeric: 'Поле :attribute должно быть не менее :arg0.',
4260
+ string: 'Поле :attribute должно содержать не менее :arg0 символов.'
4261
+ },
4262
+ mimes: 'Поле :attribute должно быть файлом типа :arg0.',
4263
+ not_equals: 'Поле :attribute не должно быть равно :arg0',
4264
+ not_in: 'Выбранное значение :attribute не должно входить в :arg0.',
4265
+ not_regex: 'Формат поля :attribute недопустим.',
4266
+ number: 'Поле :attribute должно быть числом.',
4267
+ phone_no: 'Поле :attribute должно быть действительным номером телефона.',
4268
+ range: 'Поле :attribute должно быть между :arg0 и :arg1.',
4269
+ between: 'Поле :attribute должно быть между :arg0 и :arg1, не включая границы.',
4270
+ regex: 'Формат поля :attribute недопустим.',
4271
+ required: 'Поле :attribute обязательно для заполнения.',
4272
+ required_if: 'Поле :attribute обязательно, если :arg0 равно :arg1.',
4273
+ required_unless: 'Поле :attribute обязательно, если :arg0 не входит в :arg1.',
4274
+ required_with: 'Поле :attribute обязательно, если присутствует одно из :arg0.',
4275
+ required_with_all: 'Поле :attribute обязательно, если присутствуют :arg0.',
4276
+ required_without: 'Поле :attribute обязательно, если :arg0 отсутствует.',
4277
+ required_without_all: 'Поле :attribute обязательно, если ни одно из :arg0 не присутствует.',
4278
+ same: 'Поля :attribute и :arg0 должны совпадать.',
4279
+ size: 'Поле :attribute должно быть :arg0 КБ или меньше.',
4280
+ starts_with: 'Поле :attribute должно начинаться с одного из следующих значений: :arg0',
4281
+ string: 'Поле :attribute должно быть строкой.',
4282
+ strength: 'Поле :attribute недостаточно надёжно.',
4283
+ under: 'Поле :attribute должно быть меньше :arg0.',
4284
+ url: 'Формат поля :attribute недопустим.',
4285
+ uuid: 'Поле :attribute должно быть действительным UUID.',
4286
+ unique: 'Значение поля :attribute уже занято.',
4287
+ video: 'Поле :attribute должно быть действительным видео.',
4288
+ };
4289
+
4290
+ const BUILT_IN_TRANSLATIONS = { en, de, es, fr, hi, bn, pt, ja, zh, ru };
4291
+ class InlineTranslateLoader {
4292
+ constructor(mergeTranslations = {}, replaceTranslations = {}) {
4293
+ this.mergeTranslations = mergeTranslations;
4294
+ this.replaceTranslations = replaceTranslations;
4295
+ this.translations = {};
4296
+ this.init();
4297
+ }
4298
+ init() {
4299
+ this.translations = { ...BUILT_IN_TRANSLATIONS };
4300
+ // Full replace happens first — wipes out all existing keys for that lang
4301
+ for (const lang of Object.keys(this.replaceTranslations)) {
4302
+ this.translations[lang] = { ...this.replaceTranslations[lang] };
4303
+ }
4304
+ // Merge happens second — adds new languages, or patches individual keys
4305
+ for (const lang of Object.keys(this.mergeTranslations)) {
4306
+ this.translations[lang] = {
4307
+ ...(this.translations[lang] || {}),
4308
+ ...this.mergeTranslations[lang]
4309
+ };
4310
+ }
4311
+ }
4312
+ getTranslation(lang) {
4313
+ return of(this.translations[lang] ?? this.translations['en']);
4314
+ }
4315
+ }
4316
+
4317
+ class ErrorTriggerOnDirective {
4318
+ constructor(FormGroupDirective, NgForm) {
4319
+ this.FormGroupDirective = FormGroupDirective;
4320
+ this.NgForm = NgForm;
4321
+ }
4322
+ set message(triggerState) {
4323
+ this.NgForm && (this.NgForm.errorTriggerOn = triggerState);
4324
+ this.FormGroupDirective && (this.FormGroupDirective.errorTriggerOn = triggerState);
4325
+ }
4326
+ }
4327
+ ErrorTriggerOnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorTriggerOnDirective, deps: [{ token: FormGroupDirective, optional: true }, { token: NgForm, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4328
+ ErrorTriggerOnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: ErrorTriggerOnDirective, selector: "form[ErrorTriggerOn]", inputs: { message: ["ErrorTriggerOn", "message"] }, ngImport: i0 });
4329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorTriggerOnDirective, decorators: [{
4330
+ type: Directive,
4331
+ args: [{
4332
+ selector: 'form[ErrorTriggerOn]'
4333
+ }]
4334
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4335
+ type: Optional
4336
+ }, {
4337
+ type: Inject,
4338
+ args: [FormGroupDirective]
4339
+ }] }, { type: undefined, decorators: [{
4340
+ type: Optional
4341
+ }, {
4342
+ type: Inject,
4343
+ args: [NgForm]
4344
+ }] }]; }, propDecorators: { message: [{
4345
+ type: Input,
4346
+ args: ['ErrorTriggerOn']
4347
+ }] } });
4348
+
4349
+ function TranslateLoaderFactory(config) {
4350
+ return new InlineTranslateLoader(config?.translations, config?.replaceTranslations);
4351
+ }
4352
+ function appInitializerFactory(translate, config) {
4353
+ return () => {
4354
+ const builtIn = SUPPORTED_LOCALE_LANGS;
4355
+ const supported = config?.supportedLanguages?.length ? config.supportedLanguages : builtIn;
4356
+ const browserLang = translate.getBrowserLang();
4357
+ const langToUse = browserLang && supported.includes(browserLang)
4358
+ ? browserLang
4359
+ : (config?.defaultLanguage || DEFAULT_LOCALE_LANG);
4360
+ return firstValueFrom(translate.use(langToUse));
4361
+ };
4362
+ }
4363
+ class NgAbsoluteValidatorModule {
4364
+ static forRoot(config = {}) {
4365
+ return {
4366
+ ngModule: NgAbsoluteValidatorModule,
4367
+ providers: [
4368
+ { provide: LIB_CONFIG, useValue: config },
4369
+ NgAbsoluteValidatorService,
4370
+ ReactiveValidator
4371
+ ]
4372
+ };
4373
+ }
4374
+ }
4375
+ NgAbsoluteValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4376
+ NgAbsoluteValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorModule, declarations: [NgAbsoluteValidatorComponent,
4377
+ NativeElementDirective,
4378
+ ErrorTriggerOnDirective], imports: [CommonModule,
4379
+ RuleModule,
4380
+ HttpClientModule, i1.TranslateModule], exports: [RuleModule,
4381
+ NgAbsoluteValidatorComponent,
4382
+ NativeElementDirective,
4383
+ ErrorTriggerOnDirective,
4384
+ TranslateModule] });
4385
+ NgAbsoluteValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorModule, providers: [
4386
+ NgAbsoluteValidatorService,
4387
+ ReactiveValidator,
4388
+ HttpRequestService,
4389
+ {
4390
+ provide: LIB_CONFIG,
4391
+ useValue: {}
4392
+ },
4393
+ {
4394
+ provide: APP_INITIALIZER,
4395
+ useFactory: appInitializerFactory,
4396
+ deps: [TranslateService, LIB_CONFIG],
4397
+ multi: true
4398
+ }
4399
+ ], imports: [CommonModule,
4400
+ RuleModule,
4401
+ HttpClientModule,
4402
+ TranslateModule.forRoot({
4403
+ loader: {
4404
+ provide: TranslateLoader,
4405
+ useFactory: TranslateLoaderFactory,
4406
+ deps: [LIB_CONFIG]
4407
+ },
4408
+ defaultLanguage: DEFAULT_LOCALE_LANG
4409
+ }), RuleModule,
4410
+ TranslateModule] });
4411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgAbsoluteValidatorModule, decorators: [{
4412
+ type: NgModule,
4413
+ args: [{
4414
+ declarations: [
4415
+ NgAbsoluteValidatorComponent,
4416
+ NativeElementDirective,
4417
+ ErrorTriggerOnDirective
4418
+ ],
4419
+ imports: [
4420
+ CommonModule,
4421
+ RuleModule,
4422
+ HttpClientModule,
4423
+ TranslateModule.forRoot({
4424
+ loader: {
4425
+ provide: TranslateLoader,
4426
+ useFactory: TranslateLoaderFactory,
4427
+ deps: [LIB_CONFIG]
4428
+ },
4429
+ defaultLanguage: DEFAULT_LOCALE_LANG
4430
+ })
4431
+ ],
4432
+ providers: [
4433
+ NgAbsoluteValidatorService,
4434
+ ReactiveValidator,
4435
+ HttpRequestService,
4436
+ {
4437
+ provide: LIB_CONFIG,
4438
+ useValue: {}
4439
+ },
4440
+ {
4441
+ provide: APP_INITIALIZER,
4442
+ useFactory: appInitializerFactory,
4443
+ deps: [TranslateService, LIB_CONFIG],
4444
+ multi: true
4445
+ }
4446
+ ],
4447
+ exports: [
4448
+ RuleModule,
4449
+ NgAbsoluteValidatorComponent,
4450
+ NativeElementDirective,
4451
+ ErrorTriggerOnDirective,
4452
+ TranslateModule
4453
+ ]
4454
+ }]
4455
+ }] });
4456
+
4457
+ const LOCALE_LANG_LABELS = {
4458
+ en: 'English',
4459
+ es: 'Español',
4460
+ fr: 'Français',
4461
+ de: 'Deutsch',
4462
+ hi: 'हिन्दी',
4463
+ bn: 'বাংলা',
4464
+ pt: 'Português',
4465
+ ar: 'العربية',
4466
+ ja: '日本語',
4467
+ zh: '中文',
4468
+ ru: 'Русский',
4469
+ };
4470
+
4471
+ /*
4472
+ * Public API Surface of ng-absolute-validator
4473
+ */
4474
+
4475
+ /**
4476
+ * Generated bundle index. Do not edit.
4477
+ */
4478
+
4479
+ export { AboveDirective, AcceptedDirective, AfterDirective, AlphaDashDirective, AlphaDirective, AlphaNumericDirective, ArrayDirective, BeforeDirective, BetweenDirective, BooleanDirective, ConfirmedDirective, CreditCardDirective, CvvDirective, DateDirective, DateFormatDirective, DebitCardDirective, DifferentDirective, DimensionDirective, EmailDirective, EndsWithDirective, EqualsDirective, ErrorTriggerOnDirective, ExistsDirective, ImageDirective, InDirective, IncludesDirective, IntegerDirective, IpDirective, Ipv4Directive, Ipv6Directive, JsonDirective, LOCALE_LANG_LABELS, MaxDirective, MimesDirective, MinDirective, NativeElementDirective, NgAbsoluteValidatorComponent, NgAbsoluteValidatorModule, NgAbsoluteValidatorService, NotEqualsDirective, NotInDirective, NotRegexDirective, NumberDirective, PhoneNoDirective, RangeDirective, ReactiveValidator, RegexDirective, RequiredDirective, RequiredIfDirective, RequiredUnlessDirective, RequiredWithAllDirective, RequiredWithDirective, RequiredWithoutAllDirective, RequiredWithoutDirective, RuleDirective, RuleModule, SameDirective, SizeDirective, StartsWithDirective, StrengthDirective, StringDirective, TranslateLoaderFactory, UnderDirective, UniqueDirective, UrlDirective, UuidDirective, VideoDirective, appInitializerFactory };
4480
+ //# sourceMappingURL=sbcore-ng-absolute-validator.mjs.map