ng-select2-component 15.4.0 → 17.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.
@@ -1,15 +1,12 @@
1
- import * as i4 from '@angular/cdk/overlay';
2
- import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
3
1
  import * as i0 from '@angular/core';
4
- import { input, computed, booleanAttribute, EventEmitter, signal, TemplateRef, numberAttribute, Component, Optional, Self, Attribute, Input, HostBinding, Output, ViewChild, ViewChildren, HostListener, Directive, NgModule } from '@angular/core';
5
- import { Subject } from 'rxjs';
2
+ import { Directive, input, numberAttribute, booleanAttribute, computed, output, viewChild, viewChildren, signal, TemplateRef, Component, ChangeDetectionStrategy, Optional, Self, Attribute, HostBinding, HostListener } from '@angular/core';
3
+ import { ConnectionPositionPair, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
4
+ import { NgTemplateOutlet } from '@angular/common';
5
+ import { toObservable } from '@angular/core/rxjs-interop';
6
+ import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
7
+ import { Subject, Subscription } from 'rxjs';
6
8
  import * as i1 from '@angular/cdk/scrolling';
7
9
  import * as i2 from '@angular/forms';
8
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i3 from '@angular/common';
10
- import { CommonModule } from '@angular/common';
11
- import * as i5 from 'ngx-infinite-scroll';
12
- import { InfiniteScrollModule } from 'ngx-infinite-scroll';
13
10
 
14
11
  const timeout = 200;
15
12
  const unicodePatterns = [
@@ -59,6 +56,24 @@ const unicodePatterns = [
59
56
  const defaultMinCountForSearch = 6;
60
57
  const protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
61
58
 
59
+ class Select2Hint {
60
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
61
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: Select2Hint, isStandalone: true, selector: "select2-hint, ng-select2-hint", ngImport: i0 }); }
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Hint, decorators: [{
64
+ type: Directive,
65
+ args: [{ selector: 'select2-hint, ng-select2-hint' }]
66
+ }] });
67
+
68
+ class Select2Label {
69
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
70
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: Select2Label, isStandalone: true, selector: "select2-label, ng-select2-label", ngImport: i0 }); }
71
+ }
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Label, decorators: [{
73
+ type: Directive,
74
+ args: [{ selector: 'select2-label, ng-select2-label' }]
75
+ }] });
76
+
62
77
  class Select2Utils {
63
78
  static getOptionByValue(data, value) {
64
79
  if (Array.isArray(data)) {
@@ -76,7 +91,7 @@ class Select2Utils {
76
91
  }
77
92
  }
78
93
  }
79
- return undefined;
94
+ return null;
80
95
  }
81
96
  static getOptionsByValue(data, value, multiple) {
82
97
  if (multiple) {
@@ -158,10 +173,23 @@ class Select2Utils {
158
173
  }
159
174
  static getNextOption(filteredData, hoveringOption) {
160
175
  let findIt = Select2Utils.isNullOrUndefined(hoveringOption);
161
- for (const groupOrOption of filteredData) {
162
- const options = groupOrOption.options;
163
- if (options) {
164
- for (const option of options) {
176
+ if (filteredData) {
177
+ for (const groupOrOption of filteredData) {
178
+ const options = groupOrOption.options;
179
+ if (options) {
180
+ for (const option of options) {
181
+ if (findIt) {
182
+ if (!option.disabled && !option.hide) {
183
+ return option;
184
+ }
185
+ }
186
+ else if (!findIt) {
187
+ findIt = option === hoveringOption;
188
+ }
189
+ }
190
+ }
191
+ else {
192
+ const option = groupOrOption;
165
193
  if (findIt) {
166
194
  if (!option.disabled && !option.hide) {
167
195
  return option;
@@ -172,36 +200,28 @@ class Select2Utils {
172
200
  }
173
201
  }
174
202
  }
175
- else {
176
- const option = groupOrOption;
177
- if (findIt) {
178
- if (!option.disabled && !option.hide) {
179
- return option;
180
- }
181
- }
182
- else if (!findIt) {
183
- findIt = option === hoveringOption;
184
- }
185
- }
186
203
  }
187
204
  return null;
188
205
  }
189
206
  static getFirstOption(filteredData) {
190
207
  const firstElement = filteredData[0];
191
208
  if (this.isOption(firstElement)) {
192
- return firstElement;
209
+ return firstElement ?? null;
193
210
  }
194
211
  else {
195
- return firstElement.options[0];
212
+ return firstElement.options[0] ?? null;
196
213
  }
197
214
  }
198
215
  static getLastOption(filteredData) {
199
216
  const lastElement = filteredData.at(-1);
217
+ if (!lastElement) {
218
+ return null;
219
+ }
200
220
  if (this.isOption(lastElement)) {
201
221
  return lastElement;
202
222
  }
203
223
  else {
204
- return lastElement.options.at(-1);
224
+ return lastElement.options.at(-1) ?? null;
205
225
  }
206
226
  }
207
227
  static isGroup(element) {
@@ -289,10 +309,7 @@ class Select2Utils {
289
309
  return result;
290
310
  }
291
311
  static isSearchboxHidden(data, minCountForSearch) {
292
- if (minCountForSearch === '' ||
293
- minCountForSearch === undefined ||
294
- minCountForSearch === null ||
295
- isNaN(+minCountForSearch)) {
312
+ if (minCountForSearch === undefined || minCountForSearch === null || isNaN(+minCountForSearch)) {
296
313
  minCountForSearch = defaultMinCountForSearch;
297
314
  }
298
315
  const optionCount = Select2Utils.getOptionsCount(data);
@@ -356,59 +373,24 @@ const OPEN_KEYS = ['ArrowDown', 'ArrowUp', 'Enter', ' ', 'Home', 'End', 'PageUp'
356
373
  const ON_OPEN_KEYS = ['Home', 'End', 'PageUp', 'PageDown'];
357
374
  const CLOSE_KEYS = ['Escape', 'Tab', { key: 'ArrowUp', altKey: true }];
358
375
  class Select2 {
359
- /** data of options & optiongrps */
360
- set data(data) {
361
- this._data = data;
362
- this.updateFilteredData(true);
363
- }
364
- get multiple() {
365
- return this._multiple;
366
- }
367
- set multiple(value) {
368
- this._multiple = value;
369
- this.ngOnInit();
370
- }
371
- /** minimal data of show the search field */
372
- get minCountForSearch() {
373
- return this._minCountForSearch;
374
- }
375
- set minCountForSearch(value) {
376
- this._minCountForSearch = value;
377
- this.updateSearchBox();
378
- }
379
- /** Whether selected items should be hidden. */
380
- get disabled() {
381
- return this._control ? this._control.disabled : this._disabled;
382
- }
383
- set disabled(value) {
384
- this._disabled = value;
385
- }
386
- /** The input element's value. */
387
- get value() {
388
- return this._value;
376
+ // ----------------------- HostBinding
377
+ get classMaterial() {
378
+ return this.styleMode() === 'material';
389
379
  }
390
- set value(value) {
391
- if (this.testValueChange(this._value, value)) {
392
- setTimeout(() => {
393
- if (this._value === undefined) {
394
- this._value = value ?? null;
395
- }
396
- this.writeValue(value ?? null);
397
- }, 10);
398
- }
380
+ get classNostyle() {
381
+ return this.styleMode() === 'noStyle';
399
382
  }
400
- /** Tab index for the select2 element. */
401
- get tabIndex() {
402
- return this.disabled ? -1 : this._tabIndex;
383
+ get classBorderless() {
384
+ return this.styleMode() === 'borderless';
403
385
  }
404
- set tabIndex(value) {
405
- this._tabIndex = value;
386
+ get select2above() {
387
+ return !this.overlay() ? this.listPosition() === 'above' : this._isAbobeOverlay();
406
388
  }
407
389
  get select2Options() {
408
- return this.multiple ? this.option : null;
390
+ return this.multiple() ? (this.selectedOption ?? []) : [];
409
391
  }
410
392
  get select2Option() {
411
- return this.multiple ? null : this.option;
393
+ return this.multiple() ? null : this.selectedOption;
412
394
  }
413
395
  get searchText() {
414
396
  return this.innerSearchText;
@@ -416,23 +398,32 @@ class Select2 {
416
398
  set searchText(text) {
417
399
  this.innerSearchText = text;
418
400
  }
419
- get classMaterial() {
420
- return this.styleMode === 'material';
421
- }
422
- get classNostyle() {
423
- return this.styleMode === 'noStyle';
424
- }
425
- get classBorderless() {
426
- return this.styleMode === 'borderless';
427
- }
428
- get select2above() {
429
- return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
401
+ get disabledState() {
402
+ return this._control?.disabled ?? this._disabled;
430
403
  }
431
404
  get _positions() {
432
- return this.listPosition === 'auto' ? undefined : null;
405
+ switch (this.listPosition()) {
406
+ case 'above':
407
+ return [
408
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
409
+ ];
410
+ case 'auto':
411
+ return [
412
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
413
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
414
+ ];
415
+ default:
416
+ return [
417
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
418
+ ];
419
+ }
433
420
  }
434
421
  get resultsElement() {
435
- return this.resultContainer?.nativeElement;
422
+ return this.resultContainer()?.nativeElement;
423
+ }
424
+ /** Tab index for the element. */
425
+ get _tabIndex() {
426
+ return this.disabledState ? -1 : this.tabIndex();
436
427
  }
437
428
  constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
438
429
  this._viewportRuler = _viewportRuler;
@@ -441,85 +432,143 @@ class Select2 {
441
432
  this._parentFormGroup = _parentFormGroup;
442
433
  this._control = _control;
443
434
  this._uid = `select2-${nextUniqueId++}`;
444
- this.minCharForSearch = 0;
445
- this.limitSelection = 0;
446
- this.listPosition = 'below';
435
+ // ----------------------- signal-input
436
+ /** data of options & option groups */
437
+ this.data = input.required();
438
+ /** minimum characters to start filter search */
439
+ this.minCharForSearch = input(0, { transform: numberAttribute });
440
+ /** text placeholder */
441
+ this.displaySearchStatus = input(undefined);
442
+ /** text placeholder */
443
+ this.placeholder = input(undefined);
444
+ /** in multiple: maximum selection element (0 = no limit) */
445
+ this.limitSelection = input(0, { transform: numberAttribute });
446
+ /** dropdown position */
447
+ this.listPosition = input('below');
448
+ /** overlay with CDK Angular position */
449
+ this.overlay = input(false, { transform: booleanAttribute });
447
450
  /** use the material style */
448
- this.overlay = false;
451
+ this.multiple = input(false, { transform: booleanAttribute });
449
452
  /** use the material style */
450
- this.styleMode = 'default';
453
+ this.styleMode = input('default');
454
+ /** message when no result */
455
+ this.noResultMessage = input();
451
456
  /** maximum results limit (0 = no limit) */
452
- this.maxResults = 0;
457
+ this.maxResults = input(0, { transform: numberAttribute });
453
458
  /** message when maximum results */
454
- this.maxResultsMessage = 'Too many results…';
459
+ this.maxResultsMessage = input('Too many results…');
455
460
  /** infinite scroll distance */
456
- this.infiniteScrollDistance = 1.5;
461
+ this.infiniteScrollDistance = input(1.5, { transform: numberAttribute });
457
462
  /** infinite scroll distance */
458
- this.infiniteScrollThrottle = 150;
463
+ this.infiniteScrollThrottle = input(150, { transform: numberAttribute });
459
464
  /** infinite scroll activated */
460
- this.infiniteScroll = false;
465
+ this.infiniteScroll = input(false, { transform: booleanAttribute });
461
466
  /** auto create if not exist */
462
- this.autoCreate = false;
467
+ this.autoCreate = input(false, { transform: booleanAttribute });
463
468
  /** no template for label selection */
464
- this.noLabelTemplate = false;
469
+ this.noLabelTemplate = input(false, { transform: booleanAttribute });
470
+ /** use it for change the pattern of the filter search */
471
+ this.editPattern = input(undefined);
472
+ /** template(s) for formatting */
473
+ this.templates = input(undefined);
474
+ /** template for formatting selected option */
475
+ this.templateSelection = input(undefined);
465
476
  /** the max height of the results container when opening the select */
466
- this.resultMaxHeight = '200px';
477
+ this.resultMaxHeight = input('200px');
467
478
  /** Active Search event */
468
- this.customSearchEnabled = false;
479
+ this.customSearchEnabled = input(false, { transform: booleanAttribute });
480
+ /** minimal data of show the search field */
481
+ this.minCountForSearch = input(undefined, { transform: numberAttribute });
469
482
  /** Unique id of the element. */
470
483
  this.id = input(this._uid);
484
+ /** Unique id of label element. */
471
485
  this.idLabel = computed(() => `${this.id()}-label`);
486
+ /** Unique id of combo element. */
472
487
  this.idCombo = computed(() => `${this.id()}-combo`);
488
+ /** Unique id of options element. */
473
489
  this.idOptions = computed(() => `${this.id()}-options`);
490
+ /** Unique id of overlay element. */
474
491
  this.idOverlay = computed(() => `${this.id()}-overlay`);
475
- this.title = input();
476
- this.ariaLabelledby = input();
477
- this.ariaDescribedby = input();
478
- this.ariaInvalid = input(false, { transform: booleanAttribute });
479
- this.ariaResetButtonDescription = input('Reset');
480
492
  /** Whether the element is required. */
481
- this.required = false;
493
+ this.required = input(false, { transform: booleanAttribute });
494
+ /** Whether selected items should be hidden. */
495
+ this.disabled = input(false, { transform: booleanAttribute });
482
496
  /** Whether items are hidden when has. */
483
- this.hideSelectedItems = false;
497
+ this.hideSelectedItems = input(false, { transform: booleanAttribute });
484
498
  /** Whether the element is readonly. */
485
- this.readonly = false;
499
+ this.readonly = input(false, { transform: booleanAttribute });
500
+ /** The input element's value. */
501
+ this.value = input();
502
+ /** Tab index for the select2 element. */
503
+ this.tabIndex = input(0, { transform: numberAttribute });
486
504
  /** reset with no selected value */
487
- this.resettable = false;
505
+ this.resettable = input(false, { transform: booleanAttribute });
506
+ /** selected value when × is clicked */
507
+ this.resetSelectedValue = input(undefined);
488
508
  /** grid: item by line
489
509
  * * 0 = no grid
490
510
  * * number = item by line (4)
491
511
  * * string = minimal size item (100px)
492
512
  */
493
- this.grid = '';
513
+ this.grid = input('');
514
+ /**
515
+ * Replace selection by a text
516
+ * * if string: `%size%` = total selected options
517
+ * * if function: juste show the string
518
+ */
519
+ this.selectionOverride = input(undefined);
494
520
  /** force selection on one line */
495
- this.selectionNoWrap = false;
521
+ this.selectionNoWrap = input(false, { transform: booleanAttribute });
496
522
  /** Add an option to select or remove all (if all is selected) */
497
- this.showSelectAll = false;
523
+ this.showSelectAll = input(false, { transform: booleanAttribute });
498
524
  /** Text for remove all options */
499
- this.removeAllText = 'Remove all';
525
+ this.removeAllText = input('Remove all');
500
526
  /** Text for select all options */
501
- this.selectAllText = 'Select all';
502
- this.update = new EventEmitter();
503
- this.autoCreateItem = new EventEmitter();
504
- this.open = new EventEmitter();
505
- this.close = new EventEmitter();
506
- this.focus = new EventEmitter();
507
- this.blur = new EventEmitter();
508
- this.search = new EventEmitter();
509
- this.scroll = new EventEmitter();
510
- this.removeOption = new EventEmitter();
511
- this.option = null;
527
+ this.selectAllText = input('Select all');
528
+ // -- WAI related inputs ---
529
+ /** title attribute applied to the input */
530
+ this.title = input();
531
+ /** aria-labelledby attribute applied to the input, to specify en external label */
532
+ this.ariaLabelledby = input();
533
+ /** aria-describedby attribute applied to the input */
534
+ this.ariaDescribedby = input();
535
+ /** aria-invalid attribute applied to the input, to force error state */
536
+ this.ariaInvalid = input(false, { transform: booleanAttribute });
537
+ /** description of the reset button when using 'resettable'. Default value : 'Reset' */
538
+ this.ariaResetButtonDescription = input('Reset');
539
+ // ----------------------- output
540
+ this.update = output();
541
+ this.autoCreateItem = output();
542
+ this.open = output();
543
+ this.close = output();
544
+ this.focus = output();
545
+ this.blur = output();
546
+ this.search = output();
547
+ this.scroll = output();
548
+ this.removeOption = output();
549
+ // ----------------------- signal viewChild
550
+ this.cdkConnectedOverlay = viewChild.required(CdkConnectedOverlay);
551
+ this.selection = viewChild.required('selection');
552
+ this.resultContainer = viewChild('results');
553
+ this.results = viewChildren('result');
554
+ this.searchInput = viewChild('searchInput');
555
+ this.dropdown = viewChild('dropdown');
556
+ // ----------------------- internal var
557
+ this.selectedOption = null;
512
558
  this.isOpen = false;
513
559
  /** Whether the element is focused or not. */
514
560
  this.focused = false;
515
561
  this.filteredData = signal(undefined);
562
+ this.overlayWidth = '';
563
+ this.overlayHeight = '';
516
564
  this.hoveringOption = signal(null);
517
565
  this.hoveringOptionId = computed(() => this.getElementId(this.hoveringOption()));
518
566
  this.innerSearchText = '';
519
567
  this._stateChanges = new Subject();
568
+ this._data = [];
520
569
  this._disabled = false;
521
- this._multiple = false;
522
570
  this._value = null;
571
+ this.toObservable = new Subscription();
523
572
  /** View -> model callback called when select has been touched */
524
573
  this._onTouched = () => {
525
574
  // do nothing
@@ -528,19 +577,39 @@ class Select2 {
528
577
  this._onChange = () => {
529
578
  // do nothing
530
579
  };
531
- this._tabIndex = parseInt(tabIndex, 10) || 0;
532
580
  if (this._control) {
533
581
  this._control.valueAccessor = this;
534
582
  }
583
+ this.toObservable.add(toObservable(this.multiple).subscribe(_multiple => {
584
+ this.ngOnInit();
585
+ }));
586
+ this.toObservable.add(toObservable(this.data).subscribe(_data => {
587
+ this._data = _data;
588
+ this.updateFilteredData();
589
+ }));
590
+ this.toObservable.add(toObservable(this.minCountForSearch).subscribe(minCountForSearch => {
591
+ this.updateSearchBox();
592
+ }));
593
+ this.toObservable.add(toObservable(this.disabled).subscribe(disabled => {
594
+ this._disabled = disabled;
595
+ }));
596
+ this.toObservable.add(toObservable(this.value).subscribe(value => {
597
+ if (this.testValueChange(this._value, value)) {
598
+ if (this._value === undefined) {
599
+ this._value = value;
600
+ }
601
+ this.writeValue(value);
602
+ }
603
+ }));
535
604
  }
536
605
  clickDetection(e) {
537
- if (this.isOpen && focus) {
606
+ if (this.isOpen) {
538
607
  const target = e.target;
539
608
  if (!this.ifParentContainsClass(target, 'selection')) {
540
609
  if (!this.ifParentContainsClass(target, 'select2-dropdown')) {
541
610
  this.toggleOpenAndClose();
542
611
  }
543
- if (!this.overlay && !this.ifParentContainsId(target, this.id())) {
612
+ if (!this.overlay() && !this.ifParentContainsId(target, this.id())) {
544
613
  this.clickExit();
545
614
  }
546
615
  }
@@ -560,9 +629,9 @@ class Select2 {
560
629
  this.triggerRect();
561
630
  }
562
631
  });
563
- const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
632
+ const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value(), this.multiple());
564
633
  if (option !== null) {
565
- this.option = option;
634
+ this.selectedOption = option ?? null;
566
635
  }
567
636
  if (!Array.isArray(option)) {
568
637
  this.hoveringOption.set(Select2Utils.getOptionByValue(this._data, this.value));
@@ -570,8 +639,8 @@ class Select2 {
570
639
  this.updateSearchBox();
571
640
  }
572
641
  ngAfterViewInit() {
573
- this.cdkConnectedOverlay.positionChange.subscribe((posChange) => {
574
- if (this.listPosition === 'auto' &&
642
+ this.cdkConnectedOverlay().positionChange.subscribe((posChange) => {
643
+ if (this.listPosition() === 'auto' &&
575
644
  posChange.connectionPair?.originY &&
576
645
  this._overlayPosition !== posChange.connectionPair.originY) {
577
646
  this.triggerRect();
@@ -579,7 +648,7 @@ class Select2 {
579
648
  this._changeDetectorRef.detectChanges();
580
649
  }
581
650
  });
582
- this.selectionElement = this.selection.nativeElement;
651
+ this.selectionElement = this.selection().nativeElement;
583
652
  this.triggerRect();
584
653
  }
585
654
  ngDoCheck() {
@@ -588,19 +657,31 @@ class Select2 {
588
657
  if (this._triggerRect) {
589
658
  if (this.overlayWidth !== this._triggerRect.width) {
590
659
  this.overlayWidth = this._triggerRect.width;
660
+ this._changeDetectorRef.detectChanges();
591
661
  }
592
- if (this._dropdownRect?.height > 0 && this.overlayHeight !== this._dropdownRect.height) {
593
- this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
662
+ if (this._dropdownRect &&
663
+ this._dropdownRect.height > 0 &&
664
+ this.overlayHeight !== this._dropdownRect.height) {
665
+ this.overlayHeight = this.listPosition() === 'auto' ? this._dropdownRect.height : 0;
666
+ this._changeDetectorRef.detectChanges();
594
667
  }
595
668
  }
596
669
  }
670
+ ngOnDestroy() {
671
+ this.toObservable.unsubscribe();
672
+ }
597
673
  updateSearchBox() {
598
- const hidden = this.displaySearchStatus === 'hidden' ||
599
- (this.displaySearchStatus !== 'always' &&
600
- !this.customSearchEnabled &&
601
- Select2Utils.isSearchboxHidden(this._data, this._minCountForSearch));
602
- if (this.isSearchboxHidden !== hidden) {
603
- this.isSearchboxHidden = hidden;
674
+ if (this.autoCreate() && !this.multiple()) {
675
+ this.isSearchboxHidden = false;
676
+ }
677
+ else {
678
+ const hidden = this.displaySearchStatus() === 'hidden' ||
679
+ (this.displaySearchStatus() !== 'always' &&
680
+ !this.customSearchEnabled() &&
681
+ Select2Utils.isSearchboxHidden(this._data, this.minCountForSearch()));
682
+ if (this.isSearchboxHidden !== hidden) {
683
+ this.isSearchboxHidden = hidden;
684
+ }
604
685
  }
605
686
  }
606
687
  getOptionStyle(option) {
@@ -620,10 +701,9 @@ class Select2 {
620
701
  }
621
702
  }
622
703
  reset(event) {
623
- // const test = Select2Utils.getOptionByValue(this._data, this.resetSelectedValue);
624
- // debugger;
625
- this.select(this.resetSelectedValue !== undefined
626
- ? (Select2Utils.getOptionByValue(this._data, this.resetSelectedValue) ?? null)
704
+ const resetSelectedValue = this.resetSelectedValue();
705
+ this.select(resetSelectedValue !== undefined
706
+ ? (Select2Utils.getOptionByValue(this._data, resetSelectedValue) ?? null)
627
707
  : null);
628
708
  if (event) {
629
709
  this.stopEvent(event);
@@ -638,7 +718,7 @@ class Select2 {
638
718
  event.stopPropagation();
639
719
  }
640
720
  toggleOpenAndClose(focus = true, open, event) {
641
- if (this.disabled || this.readonly) {
721
+ if (this.disabledState || this.readonly()) {
642
722
  return;
643
723
  }
644
724
  this._focus(focus);
@@ -655,22 +735,19 @@ class Select2 {
655
735
  this.keyDown(event);
656
736
  }
657
737
  else {
658
- setTimeout(() => {
659
- if (this.option) {
660
- const option = Array.isArray(this.option) ? this.option[0] : this.option;
661
- this.updateScrollFromOption(option);
662
- }
663
- else if (this.resultsElement) {
664
- this.resultsElement.scrollTop = 0;
665
- }
666
- if (onOpenAction) {
667
- this.keyDown(event);
668
- }
669
- setTimeout(() => {
670
- this.triggerRect();
671
- this.cdkConnectedOverlay?.overlayRef?.updatePosition();
672
- }, 100);
673
- });
738
+ if (this.selectedOption) {
739
+ const option = Array.isArray(this.selectedOption) ? this.selectedOption[0] : this.selectedOption;
740
+ this.updateScrollFromOption(option);
741
+ }
742
+ else if (this.resultsElement) {
743
+ this.resultsElement.scrollTop = 0;
744
+ }
745
+ if (onOpenAction) {
746
+ this.keyDown(event);
747
+ }
748
+ this._changeDetectorRef.detectChanges();
749
+ this.triggerRect();
750
+ this.cdkConnectedOverlay().overlayRef?.updatePosition();
674
751
  }
675
752
  if (changeEmit) {
676
753
  this.open.emit(this);
@@ -682,43 +759,46 @@ class Select2 {
682
759
  this._changeDetectorRef.markForCheck();
683
760
  }
684
761
  hasTemplate(option, defaultValue, select = false) {
762
+ const templates = this.templates();
763
+ const templatesValue = this.templates();
685
764
  return ((select
686
- ? this.templates?.[option.templateSelectionId] instanceof TemplateRef ||
687
- this.templates?.[`${defaultValue}Selection`] instanceof TemplateRef ||
688
- this.templates?.[`templateSelection`] instanceof TemplateRef ||
689
- this.templateSelection instanceof TemplateRef
765
+ ? templates?.[option.templateSelectionId ?? ''] instanceof TemplateRef ||
766
+ templates?.[`${defaultValue}Selection`] instanceof TemplateRef ||
767
+ templates?.[`templateSelection`] instanceof TemplateRef ||
768
+ this.templateSelection() instanceof TemplateRef
690
769
  : false) ||
691
- this.templates?.[option.templateId] instanceof TemplateRef ||
692
- this.templates?.[defaultValue] instanceof TemplateRef ||
693
- this.templates?.['template'] instanceof TemplateRef ||
694
- this.templates instanceof TemplateRef ||
770
+ templatesValue?.[option.templateId ?? ''] instanceof TemplateRef ||
771
+ templatesValue?.[defaultValue] instanceof TemplateRef ||
772
+ templatesValue?.['template'] instanceof TemplateRef ||
773
+ templatesValue instanceof TemplateRef ||
695
774
  false);
696
775
  }
697
776
  getTemplate(option, defaultValue, select = false) {
777
+ const templates = this.templates();
778
+ const templatesValue = this.templates();
698
779
  return this.hasTemplate(option, defaultValue, select)
699
780
  ? (select
700
- ? this.templates?.[option.templateSelectionId] ||
701
- this.templates?.[`${defaultValue}Selection`] ||
702
- this.templates?.[`templateSelection`] ||
703
- this.templateSelection
781
+ ? templates?.[option.templateSelectionId ?? ''] ||
782
+ templates?.[`${defaultValue}Selection`] ||
783
+ templates?.[`templateSelection`] ||
784
+ this.templateSelection()
704
785
  : undefined) ||
705
- this.templates?.[option.templateId] ||
706
- this.templates?.[defaultValue] ||
707
- this.templates?.['template'] ||
708
- this.templates
786
+ templatesValue?.[option.templateId ?? ''] ||
787
+ templatesValue?.[defaultValue] ||
788
+ templatesValue?.['template'] ||
789
+ templatesValue
709
790
  : undefined;
710
791
  }
711
792
  triggerRect() {
712
- this._triggerRect = this.selectionElement.getBoundingClientRect();
713
- this._dropdownRect = this.dropdown?.nativeElement
714
- ? this.dropdown.nativeElement.getBoundingClientRect()
715
- : undefined;
793
+ this._triggerRect = this.selectionElement?.getBoundingClientRect();
794
+ const dropdown = this.dropdown();
795
+ this._dropdownRect = dropdown?.nativeElement ? dropdown.nativeElement.getBoundingClientRect() : undefined;
716
796
  }
717
797
  isNumber(o) {
718
798
  return !isNaN(o - 0) && o !== null && o !== '' && o !== false;
719
799
  }
720
800
  selectAll() {
721
- if (this.multiple) {
801
+ if (this.multiple()) {
722
802
  if (!this.selectAllTest()) {
723
803
  const options = [];
724
804
  this._data.forEach(e => {
@@ -733,19 +813,19 @@ class Select2 {
733
813
  options.push(e);
734
814
  }
735
815
  });
736
- this.option = options;
737
- this.value = options.map(e => e.value);
816
+ this.selectedOption = options;
817
+ this.writeValue(options.map(e => e.value));
738
818
  }
739
819
  else {
740
- this.option = [];
741
- this.value = [];
820
+ this.selectedOption = [];
821
+ this.writeValue([]);
742
822
  }
743
823
  this.isOpen = false;
744
824
  this.close.emit(this);
745
825
  }
746
826
  }
747
827
  selectAllTest() {
748
- if (this.multiple && Array.isArray(this.option) && this.option.length) {
828
+ if (this.multiple() && Array.isArray(this.selectedOption) && this.selectedOption.length) {
749
829
  let options = 0;
750
830
  this._data.forEach(e => {
751
831
  if (Select2Utils.isGroup(e)) {
@@ -759,7 +839,7 @@ class Select2 {
759
839
  options++;
760
840
  }
761
841
  });
762
- return this.option.length === options;
842
+ return this.selectedOption.length === options;
763
843
  }
764
844
  return false;
765
845
  }
@@ -767,16 +847,15 @@ class Select2 {
767
847
  if (option.disabled) {
768
848
  return false;
769
849
  }
770
- return (!this.multiple ||
771
- !this.limitSelection ||
772
- (Array.isArray(this._value) && this._value.length < this.limitSelection));
850
+ const limitSelection = this.limitSelection();
851
+ return (!this.multiple() || !limitSelection || (Array.isArray(this._value) && this._value.length < limitSelection));
773
852
  }
774
853
  testValueChange(value1, value2) {
775
854
  if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
776
855
  value1 === value2) {
777
856
  return false;
778
857
  }
779
- if (this.multiple &&
858
+ if (this.multiple() &&
780
859
  value1?.length &&
781
860
  value2?.length &&
782
861
  value1.length === value2.length) {
@@ -790,68 +869,62 @@ class Select2 {
790
869
  }
791
870
  return true;
792
871
  }
793
- updateFilteredData(writeValue = false) {
794
- setTimeout(() => {
795
- let result = this._data;
796
- if (this.multiple && this.hideSelectedItems) {
797
- result = Select2Utils.getFilteredSelectedData(result, this.option);
798
- }
799
- if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
800
- result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
801
- }
802
- if (this.maxResults > 0) {
803
- const data = Select2Utils.getReduceData(result, +this.maxResults);
804
- result = data.result;
805
- this.maxResultsExceeded = data.reduce;
806
- }
807
- else {
808
- this.maxResultsExceeded = false;
809
- }
810
- if (Select2Utils.optionIsNotInFilteredData(result, this.hoveringOption())) {
811
- this.hoveringOption.set(Select2Utils.getFirstAvailableOption(result));
812
- }
813
- if (writeValue && this._previousNativeValue !== this._value) {
814
- // refresh current selected value
815
- this.writeValue(this._control ? this._control.value : this._value);
816
- }
817
- this.filteredData.set(result);
818
- // replace selected options when data change
819
- if (this.multiple && Array.isArray(this.option) && this.option.length) {
820
- const options = [];
821
- const value = this.option.map(e => e.value);
822
- this._data.forEach(e => {
823
- if (Select2Utils.isGroup(e)) {
824
- e.options.forEach(f => {
825
- if (value.includes(f.value)) {
826
- options.push(f);
827
- }
828
- });
829
- }
830
- else if (value.includes(e.value)) {
831
- options.push(e);
832
- }
833
- });
834
- // preserve selection order
835
- this.option = this.option.map(e => options.find(f => f.value === e.value));
836
- }
837
- else if (!Array.isArray(this.option) && this.option) {
838
- let option = undefined;
839
- this._data.forEach(e => {
840
- if (Select2Utils.isGroup(e)) {
841
- e.options.forEach(f => {
842
- if (this.option.value === f.value) {
843
- option = f;
844
- }
845
- });
846
- }
847
- else if (this.option.value === e.value) {
848
- option = e;
849
- }
850
- });
851
- this.option = option;
852
- }
853
- this._changeDetectorRef.detectChanges();
854
- });
872
+ updateFilteredData() {
873
+ let result = this._data;
874
+ if (this.multiple() && this.hideSelectedItems()) {
875
+ result = Select2Utils.getFilteredSelectedData(result, this.selectedOption);
876
+ }
877
+ if (!this.customSearchEnabled() && this.searchText && this.searchText.length >= +this.minCharForSearch()) {
878
+ result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern());
879
+ }
880
+ if (this.maxResults() > 0) {
881
+ const data = Select2Utils.getReduceData(result, +this.maxResults());
882
+ result = data.result;
883
+ this.maxResultsExceeded = data.reduce;
884
+ }
885
+ else {
886
+ this.maxResultsExceeded = false;
887
+ }
888
+ if (Select2Utils.optionIsNotInFilteredData(result, this.hoveringOption())) {
889
+ this.hoveringOption.set(Select2Utils.getFirstAvailableOption(result));
890
+ }
891
+ this.filteredData.set(result);
892
+ // replace selected options when data change
893
+ if (this.multiple() && Array.isArray(this.selectedOption) && this.selectedOption.length) {
894
+ const options = [];
895
+ const value = this.selectedOption.map(e => e.value);
896
+ this._data.forEach(e => {
897
+ if (Select2Utils.isGroup(e)) {
898
+ e.options.forEach(f => {
899
+ if (value.includes(f.value)) {
900
+ options.push(f);
901
+ }
902
+ });
903
+ }
904
+ else if (value.includes(e.value)) {
905
+ options.push(e);
906
+ }
907
+ });
908
+ // preserve selection order
909
+ this.selectedOption = this.selectedOption.map(e => options.find(f => f.value === e.value));
910
+ }
911
+ else if (!Array.isArray(this.selectedOption) && this.selectedOption) {
912
+ let option = null;
913
+ this._data.forEach(e => {
914
+ if (Select2Utils.isGroup(e)) {
915
+ e.options.forEach(f => {
916
+ if (this.selectedOption.value === f.value) {
917
+ option = f;
918
+ }
919
+ });
920
+ }
921
+ else if (this.selectedOption.value === e.value) {
922
+ option = e;
923
+ }
924
+ });
925
+ this.selectedOption = option;
926
+ }
927
+ this._changeDetectorRef.detectChanges();
855
928
  }
856
929
  clickExit() {
857
930
  this._focus(false);
@@ -911,7 +984,7 @@ class Select2 {
911
984
  ]);
912
985
  }
913
986
  focusin(options) {
914
- if (!this.disabled) {
987
+ if (!this.disabledState) {
915
988
  this._focus(true, options);
916
989
  }
917
990
  }
@@ -924,8 +997,9 @@ class Select2 {
924
997
  select(option, emit = true) {
925
998
  let value;
926
999
  if (option !== null && option !== undefined) {
927
- if (this.multiple) {
928
- const options = this.option;
1000
+ if (this.multiple()) {
1001
+ this.selectedOption ??= [];
1002
+ const options = this.selectedOption;
929
1003
  const index = options.findIndex(op => op.value === option.value);
930
1004
  if (index === -1) {
931
1005
  options.push(option);
@@ -933,29 +1007,29 @@ class Select2 {
933
1007
  else {
934
1008
  options.splice(index, 1);
935
1009
  }
936
- value = this.option.map(op => op.value);
1010
+ value = this.selectedOption.map(op => op.value);
937
1011
  }
938
1012
  else {
939
- this.option = option;
1013
+ this.selectedOption = option;
940
1014
  if (this.isOpen) {
941
1015
  this.isOpen = false;
942
1016
  this.close.emit(this);
943
1017
  this.selectionElement?.focus();
944
1018
  }
945
- value = this.option.value;
1019
+ value = this.selectedOption.value;
946
1020
  if (!option && this._value === null) {
947
- this._value = value ?? null;
1021
+ this._value = value;
948
1022
  }
949
1023
  }
950
1024
  }
951
1025
  else {
952
1026
  // when remove value
953
- if (Array.isArray(this.option) ? this.option?.length : this.option) {
1027
+ if (Array.isArray(this.selectedOption) ? this.selectedOption?.length : this.selectedOption) {
954
1028
  value = '';
955
1029
  }
956
- this.option = null;
1030
+ this.selectedOption = null;
957
1031
  }
958
- if (this.multiple && this.hideSelectedItems) {
1032
+ if (this.multiple() && this.hideSelectedItems()) {
959
1033
  this.updateFilteredData();
960
1034
  }
961
1035
  emit &&= value !== undefined && this.testDiffValue(this._value, value);
@@ -963,12 +1037,16 @@ class Select2 {
963
1037
  this._onChange(value);
964
1038
  }
965
1039
  if (emit) {
966
- this._value = value ?? null;
1040
+ this.writeValue(value);
967
1041
  setTimeout(() => {
968
1042
  this.update.emit({
969
1043
  component: this,
970
- value: this._value,
971
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1044
+ value: value,
1045
+ options: Array.isArray(this.selectedOption)
1046
+ ? this.selectedOption
1047
+ : this.selectedOption
1048
+ ? [this.selectedOption]
1049
+ : null,
972
1050
  });
973
1051
  });
974
1052
  }
@@ -1030,7 +1108,7 @@ class Select2 {
1030
1108
  }
1031
1109
  searchUpdate(e) {
1032
1110
  this.searchText = e.target.value;
1033
- if (!this.customSearchEnabled) {
1111
+ if (!this.customSearchEnabled()) {
1034
1112
  this.updateFilteredData();
1035
1113
  }
1036
1114
  else {
@@ -1046,24 +1124,21 @@ class Select2 {
1046
1124
  });
1047
1125
  }
1048
1126
  }
1049
- trackBy(_index, item) {
1050
- return item.value ?? item;
1051
- }
1052
1127
  isSelected(option) {
1053
- return Select2Utils.isSelected(this.option, option, this.multiple);
1128
+ return Select2Utils.isSelected(this.selectedOption, option, this.multiple());
1054
1129
  }
1055
1130
  isDisabled(option) {
1056
1131
  return option.disabled ? 'true' : 'false';
1057
1132
  }
1058
1133
  removeSelection(e, option) {
1059
- if (this.readonly || this.disabled) {
1134
+ if (this.readonly() || this.disabledState) {
1060
1135
  return;
1061
1136
  }
1062
- Select2Utils.removeSelection(this.option, option);
1063
- if (this.multiple && this.hideSelectedItems) {
1137
+ Select2Utils.removeSelection(this.selectedOption, option);
1138
+ if (this.multiple() && this.hideSelectedItems()) {
1064
1139
  this.updateFilteredData();
1065
1140
  }
1066
- const value = this.option.map(op => op.value);
1141
+ const value = this.selectedOption.map(op => op.value);
1067
1142
  if (this._control) {
1068
1143
  this._onChange(value);
1069
1144
  }
@@ -1073,7 +1148,11 @@ class Select2 {
1073
1148
  this.update.emit({
1074
1149
  component: this,
1075
1150
  value: value,
1076
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1151
+ options: Array.isArray(this.selectedOption)
1152
+ ? this.selectedOption
1153
+ : this.selectedOption
1154
+ ? [this.selectedOption]
1155
+ : null,
1077
1156
  });
1078
1157
  this.removeOption.emit({
1079
1158
  component: this,
@@ -1094,7 +1173,11 @@ class Select2 {
1094
1173
  * @param value
1095
1174
  */
1096
1175
  writeValue(value) {
1176
+ this.selectedOption = null;
1097
1177
  this._setSelectionByValue(value);
1178
+ if (this.testValueChange(this._value, value)) {
1179
+ this._value = value;
1180
+ }
1098
1181
  }
1099
1182
  /**
1100
1183
  * Saves a callback function to be invoked when the select's value
@@ -1122,7 +1205,7 @@ class Select2 {
1122
1205
  * @param isDisabled
1123
1206
  */
1124
1207
  setDisabledState(isDisabled) {
1125
- this.disabled = isDisabled;
1208
+ this._disabled = isDisabled;
1126
1209
  }
1127
1210
  onScroll(way) {
1128
1211
  this.scroll.emit({
@@ -1139,22 +1222,28 @@ class Select2 {
1139
1222
  return !!(isInvalid && (isTouched || isSubmitted));
1140
1223
  }
1141
1224
  _selectionOverrideLabel() {
1142
- if (typeof this.selectionOverride === 'function') {
1143
- return this.selectionOverride({
1225
+ const selectionOverride = this.selectionOverride();
1226
+ if (typeof selectionOverride === 'function') {
1227
+ return selectionOverride({
1144
1228
  size: this.optionsSize(),
1145
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1229
+ options: Array.isArray(this.selectedOption)
1230
+ ? this.selectedOption
1231
+ : this.selectedOption
1232
+ ? [this.selectedOption]
1233
+ : null,
1146
1234
  });
1147
1235
  }
1148
- else if (typeof this.selectionOverride === 'string') {
1149
- return this.selectionOverride.replaceAll('%size%', `${this.optionsSize()}`);
1236
+ else if (typeof selectionOverride === 'string') {
1237
+ return selectionOverride.replaceAll('%size%', `${this.optionsSize()}`);
1150
1238
  }
1239
+ return undefined;
1151
1240
  }
1152
1241
  getElementId(elt) {
1153
1242
  if (!elt) {
1154
1243
  return null;
1155
1244
  }
1156
1245
  const [i, j] = this._getElementPath(elt);
1157
- const toSuffix = index => (index !== undefined ? `-${index}` : '');
1246
+ const toSuffix = (index) => (index !== undefined ? `-${index}` : '');
1158
1247
  return elt.id ?? `${this.id()}-option${toSuffix(i)}${toSuffix(j)}`;
1159
1248
  }
1160
1249
  _getElementPath(elt) {
@@ -1172,8 +1261,14 @@ class Select2 {
1172
1261
  }
1173
1262
  return [];
1174
1263
  }
1264
+ _toGroup(group) {
1265
+ return group;
1266
+ }
1267
+ _toOption(option) {
1268
+ return option;
1269
+ }
1175
1270
  optionsSize() {
1176
- return Array.isArray(this.option) ? this.option.length : this.option ? 1 : 0;
1271
+ return Array.isArray(this.selectedOption) ? this.selectedOption.length : this.selectedOption ? 1 : 0;
1177
1272
  }
1178
1273
  addItem(value) {
1179
1274
  let item = Select2Utils.getOptionByValue(this._data, value);
@@ -1189,13 +1284,19 @@ class Select2 {
1189
1284
  createAndAdd(e) {
1190
1285
  const value = e.target.value;
1191
1286
  if (value.trim()) {
1287
+ e.target.value = '';
1288
+ this.searchText = '';
1192
1289
  const item = this.addItem(value.trim());
1193
1290
  this.click(item);
1194
- e.target.value = '';
1291
+ this.updateFilteredData();
1195
1292
  this.autoCreateItem.emit({
1196
1293
  value: item,
1197
1294
  component: this,
1198
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1295
+ options: Array.isArray(this.selectedOption)
1296
+ ? this.selectedOption
1297
+ : this.selectedOption
1298
+ ? [this.selectedOption]
1299
+ : null,
1199
1300
  });
1200
1301
  }
1201
1302
  this.stopEvent(e);
@@ -1219,7 +1320,7 @@ class Select2 {
1219
1320
  updateScrollFromOption(option) {
1220
1321
  if (option) {
1221
1322
  this.hoveringOption.set(option);
1222
- const domElement = this.results.find(r => r.nativeElement.innerText.trim() === option.label);
1323
+ const domElement = this.results().find(r => r.nativeElement.innerText.trim() === option.label);
1223
1324
  if (domElement && this.resultsElement) {
1224
1325
  this.resultsElement.scrollTop = 0;
1225
1326
  const listClientRect = this.resultsElement.getBoundingClientRect();
@@ -1249,30 +1350,35 @@ class Select2 {
1249
1350
  * found with the designated value, the select trigger is cleared.
1250
1351
  */
1251
1352
  _setSelectionByValue(value) {
1252
- if (this.option || (value !== undefined && value !== null)) {
1353
+ if (this.selectedOption || (value !== undefined && value !== null)) {
1253
1354
  const isArray = Array.isArray(value);
1254
- if (this.multiple && value && !isArray) {
1355
+ if (this.multiple() && value && !isArray) {
1255
1356
  throw new Error('Non array value.');
1256
1357
  }
1257
1358
  else if (this._data) {
1258
- if (this.multiple) {
1259
- this.option = []; // if value is null, then empty option and return
1359
+ if (this.multiple()) {
1360
+ if (!Array.isArray(this.selectedOption)) {
1361
+ this.selectedOption = []; // if value is null, then empty option and return
1362
+ }
1260
1363
  if (isArray) {
1261
1364
  // value is not null. Preselect value
1262
- const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1263
- selectedValues.map(item => this.select(item, false));
1365
+ Select2Utils.getOptionsByValue(this._data, value, this.multiple()).forEach(item => this.select(item, false));
1264
1366
  this._value ??= value;
1265
1367
  if (this.testDiffValue(this._value, value)) {
1266
1368
  this.update.emit({
1267
1369
  component: this,
1268
1370
  value: value,
1269
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1371
+ options: Array.isArray(this.selectedOption)
1372
+ ? this.selectedOption
1373
+ : this.selectedOption
1374
+ ? [this.selectedOption]
1375
+ : null,
1270
1376
  });
1271
1377
  }
1272
1378
  }
1273
1379
  else if (value === null) {
1274
1380
  // fix if value is null
1275
- this.value = [];
1381
+ this._value = [];
1276
1382
  this.reset();
1277
1383
  this.select(null, false);
1278
1384
  if (this.testDiffValue(this._value, value)) {
@@ -1280,14 +1386,18 @@ class Select2 {
1280
1386
  this.update.emit({
1281
1387
  component: this,
1282
1388
  value: this._value,
1283
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1389
+ options: Array.isArray(this.selectedOption)
1390
+ ? this.selectedOption
1391
+ : this.selectedOption
1392
+ ? [this.selectedOption]
1393
+ : null,
1284
1394
  });
1285
1395
  }
1286
1396
  }
1287
1397
  }
1288
1398
  else {
1289
- this._value ??= value;
1290
- this.select(Select2Utils.getOptionByValue(this._data, value));
1399
+ this._value = value;
1400
+ this.select(Select2Utils.getOptionByValue(this._data, this._value));
1291
1401
  }
1292
1402
  }
1293
1403
  else if (this._control) {
@@ -1298,7 +1408,7 @@ class Select2 {
1298
1408
  }
1299
1409
  /** Does some manual dirty checking on the native input `value` property. */
1300
1410
  _dirtyCheckNativeValue() {
1301
- const newValue = this.value;
1411
+ const newValue = this.value();
1302
1412
  if (this._previousNativeValue !== newValue) {
1303
1413
  this._previousNativeValue = newValue;
1304
1414
  this._stateChanges.next();
@@ -1307,29 +1417,33 @@ class Select2 {
1307
1417
  _focusSearchbox(focus = true) {
1308
1418
  if (!this.isSearchboxHidden) {
1309
1419
  setTimeout(() => {
1310
- if (this.searchInput && this.searchInput.nativeElement && focus) {
1311
- this.searchInput.nativeElement.focus();
1420
+ const searchInput = this.searchInput();
1421
+ if (searchInput && searchInput.nativeElement && focus) {
1422
+ searchInput.nativeElement.focus();
1312
1423
  }
1313
1424
  });
1314
1425
  }
1315
1426
  }
1316
1427
  _focus(state, options) {
1317
1428
  if (state) {
1318
- const eltToFocus = !this.isSearchboxHidden && this.isOpen ? this.searchInput.nativeElement : this.selection.nativeElement;
1429
+ const eltToFocus = !this.isSearchboxHidden && this.isOpen
1430
+ ? this.searchInput().nativeElement
1431
+ : this.selection().nativeElement;
1319
1432
  if (document.activeElement !== eltToFocus) {
1320
1433
  eltToFocus.focus(options);
1321
1434
  }
1322
1435
  }
1323
- else if (document.activeElement === this.selection?.nativeElement ||
1324
- document.activeElement === this.searchInput?.nativeElement) {
1436
+ else if (document.activeElement === this.selection()?.nativeElement ||
1437
+ document.activeElement === this.searchInput()?.nativeElement) {
1325
1438
  document.activeElement.blur();
1326
1439
  }
1327
1440
  this._updateFocusState(state);
1328
1441
  }
1329
1442
  _isAbobeOverlay() {
1330
- return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1443
+ const listPosition = this.listPosition();
1444
+ return this.overlay() && this._overlayPosition && listPosition === 'auto'
1331
1445
  ? this._overlayPosition === 'top'
1332
- : this.listPosition === 'above';
1446
+ : listPosition === 'above';
1333
1447
  }
1334
1448
  _updateFocusState(state) {
1335
1449
  if (!state && this.focused) {
@@ -1341,14 +1455,15 @@ class Select2 {
1341
1455
  this.focus.emit(this);
1342
1456
  }
1343
1457
  }
1344
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
1345
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: Select2, selector: "select2", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: true, transformFunction: null }, minCharForSearch: { classPropertyName: "minCharForSearch", publicName: "minCharForSearch", isSignal: false, isRequired: false, transformFunction: numberAttribute }, displaySearchStatus: { classPropertyName: "displaySearchStatus", publicName: "displaySearchStatus", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, limitSelection: { classPropertyName: "limitSelection", publicName: "limitSelection", isSignal: false, isRequired: false, transformFunction: numberAttribute }, listPosition: { classPropertyName: "listPosition", publicName: "listPosition", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, overlay: { classPropertyName: "overlay", publicName: "overlay", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, styleMode: { classPropertyName: "styleMode", publicName: "styleMode", isSignal: false, isRequired: false, transformFunction: null }, noResultMessage: { classPropertyName: "noResultMessage", publicName: "noResultMessage", isSignal: false, isRequired: false, transformFunction: null }, maxResults: { classPropertyName: "maxResults", publicName: "maxResults", isSignal: false, isRequired: false, transformFunction: numberAttribute }, maxResultsMessage: { classPropertyName: "maxResultsMessage", publicName: "maxResultsMessage", isSignal: false, isRequired: false, transformFunction: null }, infiniteScrollDistance: { classPropertyName: "infiniteScrollDistance", publicName: "infiniteScrollDistance", isSignal: false, isRequired: false, transformFunction: numberAttribute }, infiniteScrollThrottle: { classPropertyName: "infiniteScrollThrottle", publicName: "infiniteScrollThrottle", isSignal: false, isRequired: false, transformFunction: numberAttribute }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "infiniteScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autoCreate: { classPropertyName: "autoCreate", publicName: "autoCreate", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, noLabelTemplate: { classPropertyName: "noLabelTemplate", publicName: "noLabelTemplate", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, editPattern: { classPropertyName: "editPattern", publicName: "editPattern", isSignal: false, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: false, isRequired: false, transformFunction: null }, templateSelection: { classPropertyName: "templateSelection", publicName: "templateSelection", isSignal: false, isRequired: false, transformFunction: null }, resultMaxHeight: { classPropertyName: "resultMaxHeight", publicName: "resultMaxHeight", isSignal: false, isRequired: false, transformFunction: null }, customSearchEnabled: { classPropertyName: "customSearchEnabled", publicName: "customSearchEnabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, minCountForSearch: { classPropertyName: "minCountForSearch", publicName: "minCountForSearch", isSignal: false, isRequired: false, transformFunction: numberAttribute }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "ariaInvalid", isSignal: true, isRequired: false, transformFunction: null }, ariaResetButtonDescription: { classPropertyName: "ariaResetButtonDescription", publicName: "ariaResetButtonDescription", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, hideSelectedItems: { classPropertyName: "hideSelectedItems", publicName: "hideSelectedItems", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, resettable: { classPropertyName: "resettable", publicName: "resettable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, resetSelectedValue: { classPropertyName: "resetSelectedValue", publicName: "resetSelectedValue", isSignal: false, isRequired: false, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: false, isRequired: false, transformFunction: null }, selectionOverride: { classPropertyName: "selectionOverride", publicName: "selectionOverride", isSignal: false, isRequired: false, transformFunction: null }, selectionNoWrap: { classPropertyName: "selectionNoWrap", publicName: "selectionNoWrap", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, removeAllText: { classPropertyName: "removeAllText", publicName: "removeAllText", isSignal: false, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { update: "update", autoCreateItem: "autoCreateItem", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "id()", "class.select2-selection-nowrap": "this.selectionNoWrap", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.borderless": "this.classBorderless", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label\"></ng-content>\n @if (required) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n [class.select2-container--readonly]=\"readonly\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required ? 'true' : null\"\n [attr.aria-readonly]=\"readonly ? 'true' : null\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n >\n @if (selectionOverride) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n @if (\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"option\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n </span>\n @if (resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n }\n @for (op of option || []; track trackBy($index, op)) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled || readonly)) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"\n ></ng-container>\n }\n </li>\n }\n @if (autoCreate) {\n <li\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n @if (!overlay) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n [class.select2-style-borderless]=\"styleMode === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid && isNumber(grid)\"\n [class.select2-grid-auto]=\"grid && !isNumber(grid)\"\n [style.max-height]=\"resultMaxHeight\"\n [style.--grid-size]=\"grid || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll && multiple) {\n <li\n class=\"select2-results__option select2-selectall\"\n (click)=\"selectAll()\"\n tabindex=\"1\"\n aria-selected\n >\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText : selectAllText }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track trackBy(i, groupOrOption); let i = $index) {\n @if (groupOrOption.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(groupOrOption, 'group')) {\n <strong\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate(groupOrOption, 'group');\n context: groupOrOption\n \"\n >\n </ng-container>\n }\n </span>\n <ul\n class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\"\n >\n @for (option of groupOrOption.options; track trackBy(j, option); let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n @if (!hasTemplate(groupOrOption, 'option')) {\n <div [innerHTML]=\"groupOrOption.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage\"></li>\n }\n @if (maxResultsExceeded) {\n <li\n class=\"select2-too-much-result select2-results__option\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999);background:var(--select2-reset-background, transparent);border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);height:fit-content;align-self:center}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{padding:0;grid-column:col-start/col-end}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] }); }
1458
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
1459
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: Select2, isStandalone: true, selector: "select2, ng-select2", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, minCharForSearch: { classPropertyName: "minCharForSearch", publicName: "minCharForSearch", isSignal: true, isRequired: false, transformFunction: null }, displaySearchStatus: { classPropertyName: "displaySearchStatus", publicName: "displaySearchStatus", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, limitSelection: { classPropertyName: "limitSelection", publicName: "limitSelection", isSignal: true, isRequired: false, transformFunction: null }, listPosition: { classPropertyName: "listPosition", publicName: "listPosition", isSignal: true, isRequired: false, transformFunction: null }, overlay: { classPropertyName: "overlay", publicName: "overlay", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, styleMode: { classPropertyName: "styleMode", publicName: "styleMode", isSignal: true, isRequired: false, transformFunction: null }, noResultMessage: { classPropertyName: "noResultMessage", publicName: "noResultMessage", isSignal: true, isRequired: false, transformFunction: null }, maxResults: { classPropertyName: "maxResults", publicName: "maxResults", isSignal: true, isRequired: false, transformFunction: null }, maxResultsMessage: { classPropertyName: "maxResultsMessage", publicName: "maxResultsMessage", isSignal: true, isRequired: false, transformFunction: null }, infiniteScrollDistance: { classPropertyName: "infiniteScrollDistance", publicName: "infiniteScrollDistance", isSignal: true, isRequired: false, transformFunction: null }, infiniteScrollThrottle: { classPropertyName: "infiniteScrollThrottle", publicName: "infiniteScrollThrottle", isSignal: true, isRequired: false, transformFunction: null }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "infiniteScroll", isSignal: true, isRequired: false, transformFunction: null }, autoCreate: { classPropertyName: "autoCreate", publicName: "autoCreate", isSignal: true, isRequired: false, transformFunction: null }, noLabelTemplate: { classPropertyName: "noLabelTemplate", publicName: "noLabelTemplate", isSignal: true, isRequired: false, transformFunction: null }, editPattern: { classPropertyName: "editPattern", publicName: "editPattern", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null }, templateSelection: { classPropertyName: "templateSelection", publicName: "templateSelection", isSignal: true, isRequired: false, transformFunction: null }, resultMaxHeight: { classPropertyName: "resultMaxHeight", publicName: "resultMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, customSearchEnabled: { classPropertyName: "customSearchEnabled", publicName: "customSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, minCountForSearch: { classPropertyName: "minCountForSearch", publicName: "minCountForSearch", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hideSelectedItems: { classPropertyName: "hideSelectedItems", publicName: "hideSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, resettable: { classPropertyName: "resettable", publicName: "resettable", isSignal: true, isRequired: false, transformFunction: null }, resetSelectedValue: { classPropertyName: "resetSelectedValue", publicName: "resetSelectedValue", isSignal: true, isRequired: false, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, selectionOverride: { classPropertyName: "selectionOverride", publicName: "selectionOverride", isSignal: true, isRequired: false, transformFunction: null }, selectionNoWrap: { classPropertyName: "selectionNoWrap", publicName: "selectionNoWrap", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, removeAllText: { classPropertyName: "removeAllText", publicName: "removeAllText", isSignal: true, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "ariaInvalid", isSignal: true, isRequired: false, transformFunction: null }, ariaResetButtonDescription: { classPropertyName: "ariaResetButtonDescription", publicName: "ariaResetButtonDescription", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { update: "update", autoCreateItem: "autoCreateItem", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "id()", "class.select2-selection-nowrap": "selectionNoWrap()", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.borderless": "this.classBorderless", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, isSignal: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true, isSignal: true }, { propertyName: "results", predicate: ["result"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }], ngImport: i0, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label, ng-select2-label\"></ng-content>\n @if (required()) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled()\"\n [class.select2-container--readonly]=\"readonly()\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggleOpenAndClose(); $event.stopPropagation()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple()\"\n [class.select2-selection--single]=\"!multiple()\"\n >\n @if (selectionOverride()) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n\n @if (\n resettable() && !(disabled() || readonly()) && resetSelectedValue() !== _value &&\n ((!multiple() && select2Option) || (multiple() && select2Options.length > 0))\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple()) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span [class.select2-selection__placeholder__option]=\"selectedOption\" class=\"select2-selection__placeholder\">{{\n placeholder()\n }}</span>\n </span>\n\n @if (resettable() && resetSelectedValue() !== _value && select2Option && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate()) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n }\n @for (op of selectedOption || []; track op) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled() || readonly())) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"></ng-container>\n }\n </li>\n }\n @if (autoCreate()) {\n <li class=\"select2-selection__auto-create\" (focus)=\"stopEvent($event)\" (blur)=\"stopEvent($event)\">\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n @if (resettable() && $any(selectedOption)?.length > 0 && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n }\n </div>\n </div>\n @if (!overlay()) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint, ng-select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay()\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay()\"\n [class.select2-position-auto]=\"listPosition() === 'auto'\"\n [class.select2-style-borderless]=\"styleMode() === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate())\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid() && isNumber(grid())\"\n [class.select2-grid-auto]=\"grid() && !isNumber(grid())\"\n [style.max-height]=\"resultMaxHeight()\"\n [style.--grid-size]=\"grid() || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll() && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n\n >\n @if (showSelectAll() && multiple()) {\n <li class=\"select2-results__option select2-selectall\" (click)=\"selectAll()\" tabindex=\"1\" aria-selected>\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText() : selectAllText() }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track groupOrOption; let i = $index) {\n @let group = _toGroup(groupOrOption);\n @if (group.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(group, 'group')) {\n <strong\n [attr.class]=\"'select2-results__group' + (group.classes ? ' ' + group.classes : '')\"\n [innerHTML]=\"group.label\"\n ></strong>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(group, 'group'); context: group\"> </ng-container>\n }\n </span>\n <ul class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\">\n @for (option of group.options; track option; let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\">\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n @let option = _toOption(groupOrOption);\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div [innerHTML]=\"option.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage()) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage()\"></li>\n }\n @if (maxResultsExceeded) {\n <li class=\"select2-too-much-result select2-results__option\" [innerHTML]=\"maxResultsMessage()\"></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{display:inline-block;position:relative;vertical-align:middle;box-sizing:border-box;margin:0;width:100%}.select2-container .select2-container-dropdown{position:absolute;opacity:0;width:0px}.select2-container .select2-selection--single{display:block;cursor:pointer;box-sizing:border-box;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{display:block;cursor:pointer;box-sizing:border-box;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px);padding-bottom:2px;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{display:flex;flex:1 1 150px;min-width:150px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{border:0;width:100%}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{outline:0;border:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;margin-top:5px;border:none;padding:0;font-size:100%}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{display:block;position:absolute;z-index:1051;box-sizing:border-box;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-dropdown-background, white);width:100%;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{margin:0;padding:0;list-style:none}.select2-results__option{padding:var(--select2-option-padding, 6px);color:var(--select2-option-text-color, #000);-webkit-user-select:none;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{display:flex;bottom:27px;flex-direction:column-reverse;border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0)}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{display:block;position:fixed;top:0;left:0;opacity:0;z-index:99;margin:0;border:0;padding:0;width:auto;min-width:100%;height:auto;min-height:100%}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;position:absolute!important;margin:-1px!important;padding:0!important;width:1px!important;height:1px!important;overflow:hidden!important}.select2-container--default .select2-selection--single{display:flex;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{float:right;cursor:pointer;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;justify-content:center;align-items:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-width:5px 4px 0;border-style:solid;border-color:var(--select2-arrow-color, #888) transparent;width:0;height:0;content:\" \"}.select2-container--default .select2-selection__reset{align-self:center;border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);background:var(--select2-reset-background, transparent);height:fit-content;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-width:0 4px 5px;border-color:transparent transparent var(--select2-arrow-color, #888)}.select2-container--default .select2-selection--multiple{display:flex;cursor:text;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;align-items:center;box-sizing:border-box;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{line-height:var(--select2-selection-choice-line-height, 20px);list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;float:left;margin:-3px 0;width:100%;overflow:hidden;color:var(--select2-placeholder-color, #999);text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{float:right;cursor:pointer;margin-top:5px;margin-right:10px;font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice{cursor:default;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-choice-background, #e4e4e4);padding:0 5px;color:var(--select2-selection-choice-text-color, #000)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{display:inline-block;cursor:pointer;margin-right:2px;color:var(--select2-selection-choice-close-color, #999);font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-right-radius:0;border-top-left-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-right-radius:0;border-bottom-left-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);border-radius:var(--select2-search-border-radius, 0px);background:1px solid var(--select2-search-background, #fff)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;outline:none;box-shadow:none;border:none;background:transparent}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{grid-column:col-start/col-end;padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:var(--select2-option-disabled-background, transparent);color:var(--select2-option-disabled-text-color, #999)}.select2-container--default .select2-results__option[aria-selected=true]{background:var(--select2-option-selected-background, #ddd);color:var(--select2-option-selected-text-color, #000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{display:block;cursor:default;background:var(--select2-option-group-background, transparent);padding:6px;color:var(--select2-option-group-text-color, gray)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{border-color:transparent;background:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection li,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection li{display:flex}:host.material{display:inline-block;width:300px}:host.material>.select2-container{vertical-align:inherit;padding-bottom:1.29688em}:host.material>.select2-container .selection{display:inline-flex;align-items:baseline;border-top:.84375em solid transparent;padding:.4375em 0;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{box-sizing:border-box;border:0;border-radius:0;width:100%;height:24px}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);width:100%;height:1px;content:\" \"}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{display:block;position:absolute;bottom:1.63em;left:50%;transition:none;background:var(--select2-material-underline-active, #5a419e);width:0%;height:2px;content:\" \"}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;position:absolute;top:20px;left:0;transform-origin:0 21px;transition:transform .3s;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38))}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{left:0%;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{box-shadow:0 5px 5px #00000080;border:0;border-radius:0}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);color:var(--select2-hint-text-color, #888);font-size:75%}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:0}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-top:28px;margin-bottom:0}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1346
1460
  }
1347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2, decorators: [{
1461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2, decorators: [{
1348
1462
  type: Component,
1349
- args: [{ selector: 'select2', host: {
1463
+ args: [{ selector: 'select2, ng-select2', imports: [CdkOverlayOrigin, NgTemplateOutlet, CdkConnectedOverlay, InfiniteScrollDirective], host: {
1350
1464
  '[id]': 'id()',
1351
- }, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label\"></ng-content>\n @if (required) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n [class.select2-container--readonly]=\"readonly\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required ? 'true' : null\"\n [attr.aria-readonly]=\"readonly ? 'true' : null\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n >\n @if (selectionOverride) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n @if (\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"option\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n </span>\n @if (resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n }\n @for (op of option || []; track trackBy($index, op)) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled || readonly)) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"\n ></ng-container>\n }\n </li>\n }\n @if (autoCreate) {\n <li\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n @if (!overlay) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n [class.select2-style-borderless]=\"styleMode === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid && isNumber(grid)\"\n [class.select2-grid-auto]=\"grid && !isNumber(grid)\"\n [style.max-height]=\"resultMaxHeight\"\n [style.--grid-size]=\"grid || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll && multiple) {\n <li\n class=\"select2-results__option select2-selectall\"\n (click)=\"selectAll()\"\n tabindex=\"1\"\n aria-selected\n >\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText : selectAllText }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track trackBy(i, groupOrOption); let i = $index) {\n @if (groupOrOption.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(groupOrOption, 'group')) {\n <strong\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate(groupOrOption, 'group');\n context: groupOrOption\n \"\n >\n </ng-container>\n }\n </span>\n <ul\n class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\"\n >\n @for (option of groupOrOption.options; track trackBy(j, option); let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n @if (!hasTemplate(groupOrOption, 'option')) {\n <div [innerHTML]=\"groupOrOption.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage\"></li>\n }\n @if (maxResultsExceeded) {\n <li\n class=\"select2-too-much-result select2-results__option\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999);background:var(--select2-reset-background, transparent);border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);height:fit-content;align-self:center}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{padding:0;grid-column:col-start/col-end}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"] }]
1465
+ '[class.select2-selection-nowrap]': 'selectionNoWrap()',
1466
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label, ng-select2-label\"></ng-content>\n @if (required()) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled()\"\n [class.select2-container--readonly]=\"readonly()\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggleOpenAndClose(); $event.stopPropagation()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple()\"\n [class.select2-selection--single]=\"!multiple()\"\n >\n @if (selectionOverride()) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n\n @if (\n resettable() && !(disabled() || readonly()) && resetSelectedValue() !== _value &&\n ((!multiple() && select2Option) || (multiple() && select2Options.length > 0))\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple()) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span [class.select2-selection__placeholder__option]=\"selectedOption\" class=\"select2-selection__placeholder\">{{\n placeholder()\n }}</span>\n </span>\n\n @if (resettable() && resetSelectedValue() !== _value && select2Option && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate()) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n }\n @for (op of selectedOption || []; track op) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled() || readonly())) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"></ng-container>\n }\n </li>\n }\n @if (autoCreate()) {\n <li class=\"select2-selection__auto-create\" (focus)=\"stopEvent($event)\" (blur)=\"stopEvent($event)\">\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n @if (resettable() && $any(selectedOption)?.length > 0 && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n }\n </div>\n </div>\n @if (!overlay()) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint, ng-select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay()\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay()\"\n [class.select2-position-auto]=\"listPosition() === 'auto'\"\n [class.select2-style-borderless]=\"styleMode() === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate())\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid() && isNumber(grid())\"\n [class.select2-grid-auto]=\"grid() && !isNumber(grid())\"\n [style.max-height]=\"resultMaxHeight()\"\n [style.--grid-size]=\"grid() || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll() && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n\n >\n @if (showSelectAll() && multiple()) {\n <li class=\"select2-results__option select2-selectall\" (click)=\"selectAll()\" tabindex=\"1\" aria-selected>\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText() : selectAllText() }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track groupOrOption; let i = $index) {\n @let group = _toGroup(groupOrOption);\n @if (group.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(group, 'group')) {\n <strong\n [attr.class]=\"'select2-results__group' + (group.classes ? ' ' + group.classes : '')\"\n [innerHTML]=\"group.label\"\n ></strong>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(group, 'group'); context: group\"> </ng-container>\n }\n </span>\n <ul class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\">\n @for (option of group.options; track option; let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\">\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n @let option = _toOption(groupOrOption);\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div [innerHTML]=\"option.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage()) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage()\"></li>\n }\n @if (maxResultsExceeded) {\n <li class=\"select2-too-much-result select2-results__option\" [innerHTML]=\"maxResultsMessage()\"></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{display:inline-block;position:relative;vertical-align:middle;box-sizing:border-box;margin:0;width:100%}.select2-container .select2-container-dropdown{position:absolute;opacity:0;width:0px}.select2-container .select2-selection--single{display:block;cursor:pointer;box-sizing:border-box;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{display:block;cursor:pointer;box-sizing:border-box;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px);padding-bottom:2px;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{display:flex;flex:1 1 150px;min-width:150px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{border:0;width:100%}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{outline:0;border:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;margin-top:5px;border:none;padding:0;font-size:100%}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{display:block;position:absolute;z-index:1051;box-sizing:border-box;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-dropdown-background, white);width:100%;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{margin:0;padding:0;list-style:none}.select2-results__option{padding:var(--select2-option-padding, 6px);color:var(--select2-option-text-color, #000);-webkit-user-select:none;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{display:flex;bottom:27px;flex-direction:column-reverse;border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0)}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{display:block;position:fixed;top:0;left:0;opacity:0;z-index:99;margin:0;border:0;padding:0;width:auto;min-width:100%;height:auto;min-height:100%}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;position:absolute!important;margin:-1px!important;padding:0!important;width:1px!important;height:1px!important;overflow:hidden!important}.select2-container--default .select2-selection--single{display:flex;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{float:right;cursor:pointer;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;justify-content:center;align-items:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-width:5px 4px 0;border-style:solid;border-color:var(--select2-arrow-color, #888) transparent;width:0;height:0;content:\" \"}.select2-container--default .select2-selection__reset{align-self:center;border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);background:var(--select2-reset-background, transparent);height:fit-content;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-width:0 4px 5px;border-color:transparent transparent var(--select2-arrow-color, #888)}.select2-container--default .select2-selection--multiple{display:flex;cursor:text;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;align-items:center;box-sizing:border-box;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{line-height:var(--select2-selection-choice-line-height, 20px);list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;float:left;margin:-3px 0;width:100%;overflow:hidden;color:var(--select2-placeholder-color, #999);text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{float:right;cursor:pointer;margin-top:5px;margin-right:10px;font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice{cursor:default;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-choice-background, #e4e4e4);padding:0 5px;color:var(--select2-selection-choice-text-color, #000)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{display:inline-block;cursor:pointer;margin-right:2px;color:var(--select2-selection-choice-close-color, #999);font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-right-radius:0;border-top-left-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-right-radius:0;border-bottom-left-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);border-radius:var(--select2-search-border-radius, 0px);background:1px solid var(--select2-search-background, #fff)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;outline:none;box-shadow:none;border:none;background:transparent}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{grid-column:col-start/col-end;padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:var(--select2-option-disabled-background, transparent);color:var(--select2-option-disabled-text-color, #999)}.select2-container--default .select2-results__option[aria-selected=true]{background:var(--select2-option-selected-background, #ddd);color:var(--select2-option-selected-text-color, #000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{display:block;cursor:default;background:var(--select2-option-group-background, transparent);padding:6px;color:var(--select2-option-group-text-color, gray)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{border-color:transparent;background:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection li,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection li{display:flex}:host.material{display:inline-block;width:300px}:host.material>.select2-container{vertical-align:inherit;padding-bottom:1.29688em}:host.material>.select2-container .selection{display:inline-flex;align-items:baseline;border-top:.84375em solid transparent;padding:.4375em 0;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{box-sizing:border-box;border:0;border-radius:0;width:100%;height:24px}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);width:100%;height:1px;content:\" \"}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{display:block;position:absolute;bottom:1.63em;left:50%;transition:none;background:var(--select2-material-underline-active, #5a419e);width:0%;height:2px;content:\" \"}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;position:absolute;top:20px;left:0;transform-origin:0 21px;transition:transform .3s;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38))}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{left:0%;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{box-shadow:0 5px 5px #00000080;border:0;border-radius:0}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);color:var(--select2-hint-text-color, #888);font-size:75%}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:0}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-top:28px;margin-bottom:0}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"] }]
1352
1467
  }], ctorParameters: () => [{ type: i1.ViewportRuler }, { type: i0.ChangeDetectorRef }, { type: i2.NgForm, decorators: [{
1353
1468
  type: Optional
1354
1469
  }] }, { type: i2.FormGroupDirective, decorators: [{
@@ -1360,123 +1475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1360
1475
  }] }, { type: undefined, decorators: [{
1361
1476
  type: Attribute,
1362
1477
  args: ['tabindex']
1363
- }] }], propDecorators: { data: [{
1364
- type: Input,
1365
- args: [{ required: true }]
1366
- }], minCharForSearch: [{
1367
- type: Input,
1368
- args: [{ transform: numberAttribute }]
1369
- }], displaySearchStatus: [{
1370
- type: Input
1371
- }], placeholder: [{
1372
- type: Input
1373
- }], limitSelection: [{
1374
- type: Input,
1375
- args: [{ transform: numberAttribute }]
1376
- }], listPosition: [{
1377
- type: Input
1378
- }], multiple: [{
1379
- type: Input,
1380
- args: [{ transform: booleanAttribute }]
1381
- }], overlay: [{
1382
- type: Input,
1383
- args: [{ transform: booleanAttribute }]
1384
- }], styleMode: [{
1385
- type: Input
1386
- }], noResultMessage: [{
1387
- type: Input
1388
- }], maxResults: [{
1389
- type: Input,
1390
- args: [{ transform: numberAttribute }]
1391
- }], maxResultsMessage: [{
1392
- type: Input
1393
- }], infiniteScrollDistance: [{
1394
- type: Input,
1395
- args: [{ transform: numberAttribute }]
1396
- }], infiniteScrollThrottle: [{
1397
- type: Input,
1398
- args: [{ transform: numberAttribute }]
1399
- }], infiniteScroll: [{
1400
- type: Input,
1401
- args: [{ transform: booleanAttribute }]
1402
- }], autoCreate: [{
1403
- type: Input,
1404
- args: [{ transform: booleanAttribute }]
1405
- }], noLabelTemplate: [{
1406
- type: Input,
1407
- args: [{ transform: booleanAttribute }]
1408
- }], editPattern: [{
1409
- type: Input
1410
- }], templates: [{
1411
- type: Input
1412
- }], templateSelection: [{
1413
- type: Input
1414
- }], resultMaxHeight: [{
1415
- type: Input
1416
- }], customSearchEnabled: [{
1417
- type: Input,
1418
- args: [{ transform: booleanAttribute }]
1419
- }], minCountForSearch: [{
1420
- type: Input,
1421
- args: [{ transform: numberAttribute }]
1422
- }], required: [{
1423
- type: Input,
1424
- args: [{ transform: booleanAttribute }]
1425
- }], disabled: [{
1426
- type: Input,
1427
- args: [{ transform: booleanAttribute }]
1428
- }], hideSelectedItems: [{
1429
- type: Input,
1430
- args: [{ transform: booleanAttribute }]
1431
- }], readonly: [{
1432
- type: Input,
1433
- args: [{ transform: booleanAttribute }]
1434
- }], value: [{
1435
- type: Input
1436
- }], tabIndex: [{
1437
- type: Input,
1438
- args: [{ transform: numberAttribute }]
1439
- }], resettable: [{
1440
- type: Input,
1441
- args: [{ transform: booleanAttribute }]
1442
- }], resetSelectedValue: [{
1443
- type: Input
1444
- }], grid: [{
1445
- type: Input
1446
- }], selectionOverride: [{
1447
- type: Input
1448
- }], selectionNoWrap: [{
1449
- type: HostBinding,
1450
- args: ['class.select2-selection-nowrap']
1451
- }, {
1452
- type: Input,
1453
- args: [{ transform: booleanAttribute }]
1454
- }], showSelectAll: [{
1455
- type: Input,
1456
- args: [{ transform: booleanAttribute }]
1457
- }], removeAllText: [{
1458
- type: Input
1459
- }], selectAllText: [{
1460
- type: Input
1461
- }], update: [{
1462
- type: Output
1463
- }], autoCreateItem: [{
1464
- type: Output
1465
- }], open: [{
1466
- type: Output
1467
- }], close: [{
1468
- type: Output
1469
- }], focus: [{
1470
- type: Output
1471
- }], blur: [{
1472
- type: Output
1473
- }], search: [{
1474
- type: Output
1475
- }], scroll: [{
1476
- type: Output
1477
- }], removeOption: [{
1478
- type: Output
1479
- }], classMaterial: [{
1478
+ }] }], propDecorators: { classMaterial: [{
1480
1479
  type: HostBinding,
1481
1480
  args: ['class.material']
1482
1481
  }], classNostyle: [{
@@ -1488,61 +1487,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1488
1487
  }], select2above: [{
1489
1488
  type: HostBinding,
1490
1489
  args: ['class.select2-above']
1491
- }], cdkConnectedOverlay: [{
1492
- type: ViewChild,
1493
- args: [CdkConnectedOverlay]
1494
- }], selection: [{
1495
- type: ViewChild,
1496
- args: ['selection', { static: true }]
1497
- }], resultContainer: [{
1498
- type: ViewChild,
1499
- args: ['results']
1500
- }], results: [{
1501
- type: ViewChildren,
1502
- args: ['result']
1503
- }], searchInput: [{
1504
- type: ViewChild,
1505
- args: ['searchInput']
1506
- }], dropdown: [{
1507
- type: ViewChild,
1508
- args: ['dropdown']
1509
1490
  }], clickDetection: [{
1510
1491
  type: HostListener,
1511
1492
  args: ['document:click', ['$event']]
1512
1493
  }] } });
1513
1494
 
1514
- class Select2Hint {
1515
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1516
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: Select2Hint, selector: "select2-hint", ngImport: i0 }); }
1517
- }
1518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Hint, decorators: [{
1519
- type: Directive,
1520
- args: [{ selector: 'select2-hint' }]
1521
- }] });
1522
-
1523
- class Select2Label {
1524
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1525
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: Select2Label, selector: "select2-label", ngImport: i0 }); }
1526
- }
1527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Label, decorators: [{
1528
- type: Directive,
1529
- args: [{ selector: 'select2-label' }]
1530
- }] });
1531
-
1532
- class Select2Module {
1533
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1534
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: Select2Module, declarations: [Select2Hint, Select2Label, Select2], imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule], exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2] }); }
1535
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Module, imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule, FormsModule, ReactiveFormsModule] }); }
1536
- }
1537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Select2Module, decorators: [{
1538
- type: NgModule,
1539
- args: [{
1540
- imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
1541
- declarations: [Select2Hint, Select2Label, Select2],
1542
- exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
1543
- }]
1544
- }] });
1545
-
1546
1495
  /*
1547
1496
  * Public API Surface of ng-select2-component
1548
1497
  */
@@ -1551,5 +1500,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1551
1500
  * Generated bundle index. Do not edit.
1552
1501
  */
1553
1502
 
1554
- export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1503
+ export { Select2, Select2Hint, Select2Label, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1555
1504
  //# sourceMappingURL=ng-select2-component.mjs.map