{"version":3,"sources":["../../node_modules/tslib/tslib.es6.js","../../src/app/components/multiselect/multiselect.ts"],"names":["Object","create","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","__read","n","r","e","ar","push","error","MULTISELECT_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","MultiSelect","multi","MultiSelectItem","this","onClick","EventEmitter","onKeydown","prototype","onOptionClick","event","emit","originalEvent","option","onOptionKeydown","Component","args","selector","template","encapsulation","ViewEncapsulation","None","Input","Output","el","renderer","cd","filterService","filter","displaySelectedLabel","maxSelectedLabels","selectedItemsLabel","showToggleAll","emptyFilterMessage","resetFilterOnHide","dropdownIcon","showHeader","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","filterMatchMode","tooltip","tooltipPosition","tooltipPositionStyle","autofocusFilter","display","onChange","onFocus","onBlur","onPanelShow","onPanelHide","scrollHeight","onModelChange","onModelTouched","defineProperty","_defaultLabel","val","updateLabel","_placeholder","_options","_filterValue","activateFilter","ngOnInit","ngAfterContentInit","_this","templates","forEach","item","getType","itemTemplate","groupTemplate","selectedItemsTemplate","headerTemplate","footerTemplate","ngAfterViewInit","overlayVisible","show","ngAfterViewChecked","filtered","alignOverlay","getOptionLabel","optionLabel","ObjectUtils","resolveFieldData","undefined","label","getOptionValue","optionValue","getOptionGroupLabel","optionGroup","optionGroupLabel","getOptionGroupChildren","optionGroupChildren","items","isOptionDisabled","optionDisabled","disabled","maxSelectionLimitReached","isSelected","writeValue","updateFilledState","checkSelectionLimit","markForCheck","selectionLimit","filled","registerOnChange","fn","registerOnTouched","setDisabledState","selectionIndex","findSelectionIndex","arguments","concat","__spread","itemValue","index","equals","dataKey","optionsToRender","optionsToRender_1","optionsToRender_1_1","toggleAll","toggleAllDisabled","readonly","allChecked","uncheckAll","checkAll","preventDefault","opt","group","onOverlayAnimationStart","toState","overlay","element","appendOverlay","style","zIndex","String","DomHandler","zindex","bindDocumentClickListener","bindDocumentResizeListener","bindScrollListener","filterInputChild","nativeElement","preventModelTouched","focus","onOverlayHide","appendTo","document","body","appendChild","minWidth","getWidth","containerViewChild","restoreOverlayAppend","absolutePosition","relativePosition","hide","unbindDocumentClickListener","_filteredOptions","close","stopPropagation","onMouseclick","input","target","isSameNode","accessibleViewChild","isOverlayClick","hasClass","removeChip","chip","targetNode","contains","isOutsideClicked","onInputFocus","onInputBlur","which","nextItem","findNextItem","parentElement","prevItem","findPrevItem","nextElementSibling","children","isHidden","previousElementSibling","altKey","options","itemLabel","findLabelByValue","valuesAsString","pattern","test","replace","match","placeholder","defaultLabel","searchLabelByValue","selectedDisabledItemsLength","unselectedDisabledItemsLength","selectedEnabledItemsLength","visibleOptionsLength","optionsToRender_2","optionsToRender_2_1","_c","e_3","_d","selected","hasFilter","trim","onFilter","searchFields","filterBy","split","searchFields_1","filteredGroups","_b","optgroup","filteredSubOptions","filterValue","filterLocale","onHeaderCheckboxFocus","headerCheckboxFocus","onHeaderCheckboxBlur","documentClickListener","documentTarget","ownerDocument","listen","documentResizeListener","onWindowResize","bind","window","addEventListener","unbindDocumentResizeListener","removeEventListener","isAndroid","scrollHandler","ConnectedOverlayScrollHandler","unbindScrollListener","ngOnDestroy","destroy","animations","trigger","transition","opacity","transform","animate","host","[class.p-inputwrapper-filled]","[class.p-inputwrapper-focus]","providers","changeDetection","ChangeDetectionStrategy","OnPush","ElementRef","Renderer2","ChangeDetectorRef","FilterService","ViewChild","ContentChild","Footer","Header","ContentChildren","PrimeTemplate","NgModule","imports","CommonModule","SharedModule","ScrollingModule","TooltipModule","RippleModule","exports","declarations"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAYpBC,EAASC,GACrB,IAAIC,EAAsB,mBAAXC,QAAyBA,OAAOC,SAAUC,EAAIH,GAAKD,EAAEC,GAAII,EAAI,EAC5E,GAAID,EAAG,OAAOA,EAAEE,KAAKN,GACrB,GAAIA,GAAyB,iBAAbA,EAAEO,OAAqB,MAAO,CAC1CC,KAAM,WAEF,OAD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EAAAA,+BAEAA,EAAAA,uBAEAA,EAAAA,kCAEA8O,EAAAA,UAASpP,KAAA,CAAC,uCAEVoP,EAAAA,UAASpP,KAAA,CAAC,4CAEVoP,EAAAA,UAASpP,KAAA,CAAC,2BAEVqP,EAAAA,aAAYrP,KAAA,CAACsP,EAAAA,6BAEbD,EAAAA,aAAYrP,KAAA,CAACuP,EAAAA,2BAEbC,EAAAA,gBAAexP,KAAA,CAACyP,EAAAA,iCAEhBlP,EAAAA,wBAEAA,EAAAA,uBAEAA,EAAAA,wBAEAA,EAAAA,4BAEAA,EAAAA,4BAEAA,EAAAA,6BAEAD,EAAAA,4BAIAA,EAAAA,2BAWAA,EAAAA,uBASAA,EAAAA,2BAQAA,EAAAA,eA4vBL,iCALCoP,EAAAA,SAAQ1P,KAAA,CAAC,CACN2P,QAAS,CAACC,EAAAA,aAAaC,EAAAA,aAAaC,EAAAA,gBAAgBC,EAAAA,cAAcC,EAAAA,cAClEC,QAAS,CAAChR,EAAY4Q,EAAAA,aAAaC,EAAAA,iBACnCI,aAAc,CAACjR,EAAYE","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { NgModule, Component, ElementRef, OnInit, AfterViewInit, AfterContentInit, AfterViewChecked, OnDestroy, Input, Output, Renderer2, EventEmitter,\n forwardRef, ViewChild, ChangeDetectorRef, TemplateRef, ContentChildren, QueryList, ContentChild, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';\nimport { trigger,style,transition,animate,AnimationEvent} from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';\nimport { ObjectUtils } from 'primeng/utils';\nimport { SharedModule, PrimeTemplate, Footer, Header, FilterService } from 'primeng/api';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { RippleModule } from 'primeng/ripple';\n\nexport const MULTISELECT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MultiSelect),\n multi: true\n};\n\n@Component({\n selector: 'p-multiSelectItem',\n template: `\n
  • \n
    \n
    \n \n
    \n
    \n {{label}}\n \n
  • \n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class MultiSelectItem {\n\n @Input() option: any;\n\n @Input() selected: boolean;\n\n @Input() label: any;\n\n @Input() disabled: boolean;\n\n @Input() itemSize: number;\n\n @Input() template: TemplateRef;\n\n @Output() onClick: EventEmitter = new EventEmitter();\n\n @Output() onKeydown: EventEmitter = new EventEmitter();\n\n onOptionClick(event: Event) {\n this.onClick.emit({\n originalEvent: event,\n option: this.option\n });\n }\n\n onOptionKeydown(event: Event) {\n this.onKeydown.emit({\n originalEvent: event,\n option: this.option\n });\n }\n}\n\n@Component({\n selector: 'p-multiSelect',\n template: `\n
    \n
    \n \n
    \n
    \n
    \n \n {{valuesAsString || 'empty'}}\n \n
    \n {{findLabelByValue(item)}}\n \n
    \n {{placeholder || defaultLabel || 'empty'}}\n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n \n
    \n
    \n
      \n \n \n
    • \n {{getOptionGroupLabel(optgroup)||'empty'}}\n \n
    • \n \n
      \n
      \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    • {{emptyFilterMessage}}
    • \n
      \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n `,\n animations: [\n trigger('overlayAnimation', [\n transition(':enter', [\n style({opacity: 0, transform: 'scaleY(0.8)'}),\n animate('{{showTransitionParams}}')\n ]),\n transition(':leave', [\n animate('{{hideTransitionParams}}', style({ opacity: 0 }))\n ])\n ])\n ],\n host: {\n '[class.p-inputwrapper-filled]': 'filled',\n '[class.p-inputwrapper-focus]': 'focus || overlayVisible'\n },\n providers: [MULTISELECT_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./multiselect.css']\n})\nexport class MultiSelect implements OnInit,AfterViewInit,AfterContentInit,AfterViewChecked,OnDestroy,ControlValueAccessor {\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() panelStyle: any;\n\n @Input() panelStyleClass: string;\n\n @Input() inputId: string;\n\n @Input() disabled: boolean;\n\n @Input() readonly: boolean;\n\n @Input() group: boolean;\n\n @Input() filter: boolean = true;\n\n @Input() filterPlaceHolder: string;\n\n @Input() filterLocale: string;\n\n @Input() overlayVisible: boolean;\n\n @Input() tabindex: number;\n\n @Input() appendTo: any;\n\n @Input() dataKey: string;\n\n @Input() name: string;\n\n @Input() ariaLabelledBy: string;\n\n @Input() displaySelectedLabel: boolean = true;\n\n @Input() maxSelectedLabels: number = 3;\n\n @Input() selectionLimit: number;\n\n @Input() selectedItemsLabel: string = '{0} items selected';\n\n @Input() showToggleAll: boolean = true;\n\n @Input() emptyFilterMessage: string = 'No results found';\n\n @Input() resetFilterOnHide: boolean = false;\n\n @Input() dropdownIcon: string = 'pi pi-chevron-down';\n\n @Input() optionLabel: string;\n\n @Input() optionValue: string;\n\n @Input() optionDisabled: string;\n\n @Input() optionGroupLabel: string;\n\n @Input() optionGroupChildren: string;\n\n @Input() showHeader: boolean = true;\n\n @Input() autoZIndex: boolean = true;\n\n @Input() baseZIndex: number = 0;\n\n @Input() filterBy: string;\n\n @Input() virtualScroll: boolean;\n\n @Input() itemSize: number;\n\n @Input() showTransitionOptions: string = '.12s cubic-bezier(0, 0, 0.2, 1)';\n\n @Input() hideTransitionOptions: string = '.1s linear';\n\n @Input() ariaFilterLabel: string;\n\n @Input() filterMatchMode: string = \"contains\";\n\n @Input() tooltip: string = '';\n\n @Input() tooltipPosition: string = 'right';\n\n @Input() tooltipPositionStyle: string = 'absolute';\n\n @Input() tooltipStyleClass: string;\n\n @Input() autofocusFilter: boolean = true;\n\n @Input() display: string = 'comma';\n\n @ViewChild('container') containerViewChild: ElementRef;\n\n @ViewChild('filterInput') filterInputChild: ElementRef;\n\n @ViewChild('in') accessibleViewChild: ElementRef;\n\n @ContentChild(Footer) footerFacet;\n\n @ContentChild(Header) headerFacet;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n @Output() onChange: EventEmitter = new EventEmitter();\n\n @Output() onFocus: EventEmitter = new EventEmitter();\n\n @Output() onBlur: EventEmitter = new EventEmitter();\n\n @Output() onClick: EventEmitter = new EventEmitter();\n\n @Output() onPanelShow: EventEmitter = new EventEmitter();\n\n @Output() onPanelHide: EventEmitter = new EventEmitter();\n\n @Input() scrollHeight: string = '200px';\n\n _defaultLabel: string;\n\n @Input() set defaultLabel(val: string) {\n this._defaultLabel = val;\n this.updateLabel();\n }\n\n get defaultLabel(): string {\n return this._defaultLabel;\n }\n\n _placeholder: string;\n\n @Input() set placeholder(val: string) {\n this._placeholder = val;\n this.updateLabel();\n }\n\n get placeholder(): string {\n return this._placeholder;\n }\n\n @Input() get options(): any[] {\n return this._options;\n }\n\n set options(val: any[]) {\n this._options = val;\n }\n\n @Input() get filterValue(): string {\n return this._filterValue;\n }\n\n set filterValue(val: string) {\n this._filterValue = val;\n this.activateFilter();\n }\n\n public value: any[];\n\n public _filteredOptions: any[];\n\n public onModelChange: Function = () => {};\n\n public onModelTouched: Function = () => {};\n\n overlay: HTMLDivElement;\n\n public valuesAsString: string;\n\n public focus: boolean;\n\n filled: boolean;\n\n public documentClickListener: any;\n\n public _filterValue: string;\n\n public filtered: boolean;\n\n public itemTemplate: TemplateRef;\n\n public groupTemplate: TemplateRef;\n\n public headerTemplate: TemplateRef;\n\n public footerTemplate: TemplateRef;\n\n public selectedItemsTemplate: TemplateRef;\n\n public headerCheckboxFocus: boolean;\n\n _options: any[];\n\n maxSelectionLimitReached: boolean;\n\n scrollHandler: any;\n\n documentResizeListener: any;\n\n preventModelTouched: boolean;\n\n constructor(public el: ElementRef, public renderer: Renderer2, public cd: ChangeDetectorRef, public filterService: FilterService) {}\n\n ngOnInit() {\n this.updateLabel();\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n case 'group':\n this.groupTemplate = item.template;\n break;\n\n case 'selectedItems':\n this.selectedItemsTemplate = item.template;\n break;\n\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n if (this.overlayVisible) {\n this.show();\n }\n }\n\n ngAfterViewChecked() {\n if (this.filtered) {\n this.alignOverlay();\n\n this.filtered = false;\n }\n }\n\n getOptionLabel(option: any) {\n return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : (option.label != undefined ? option.label : option);\n }\n\n getOptionValue(option: any) {\n return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (this.optionLabel ? option : option.value);\n }\n\n getOptionGroupLabel(optionGroup: any) {\n return this.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel) : (optionGroup.label != undefined ? optionGroup.label : optionGroup);\n }\n\n getOptionGroupChildren(optionGroup: any) {\n return this.optionGroupChildren ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;\n }\n\n isOptionDisabled(option: any) {\n let disabled = this.optionDisabled ? ObjectUtils.resolveFieldData(option, this.optionDisabled) : (option.disabled !== undefined ? option.disabled : false);\n return (disabled || (this.maxSelectionLimitReached && !this.isSelected(option)));\n }\n\n writeValue(value: any) : void {\n this.value = value;\n this.updateLabel();\n this.updateFilledState();\n this.checkSelectionLimit();\n\n this.cd.markForCheck();\n }\n\n checkSelectionLimit() {\n if (this.selectionLimit && (this.value && this.value.length === this.selectionLimit)) {\n this.maxSelectionLimitReached = true;\n }\n else {\n this.maxSelectionLimitReached = false;\n }\n }\n\n updateFilledState() {\n this.filled = (this.value && this.value.length > 0);\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n onOptionClick(event) {\n let option = event.option;\n if (this.isOptionDisabled(option)) {\n return;\n }\n\n let optionValue = this.getOptionValue(option);\n let selectionIndex = this.findSelectionIndex(optionValue);\n if (selectionIndex != -1) {\n this.value = this.value.filter((val,i) => i != selectionIndex);\n\n if (this.selectionLimit) {\n this.maxSelectionLimitReached = false;\n }\n }\n else {\n if (!this.selectionLimit || (!this.value || this.value.length < this.selectionLimit)) {\n this.value = [...this.value || [], optionValue];\n }\n\n this.checkSelectionLimit();\n }\n\n this.onModelChange(this.value);\n this.onChange.emit({originalEvent: event.originalEvent, value: this.value, itemValue: optionValue});\n this.updateLabel();\n this.updateFilledState();\n }\n\n isSelected(option) {\n return this.findSelectionIndex(this.getOptionValue(option)) != -1;\n }\n\n findSelectionIndex(val: any): number {\n let index = -1;\n\n if (this.value) {\n for (let i = 0; i < this.value.length; i++) {\n if (ObjectUtils.equals(this.value[i], val, this.dataKey)) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n get toggleAllDisabled(): boolean {\n let optionsToRender = this.optionsToRender;\n if (!optionsToRender || optionsToRender.length === 0) {\n return true;\n }\n else {\n for (let option of optionsToRender) {\n if (!this.isOptionDisabled(option))\n return false;\n }\n\n return true;\n }\n }\n\n toggleAll(event) {\n if (this.disabled || this.toggleAllDisabled || this.readonly) {\n return;\n }\n \n let allChecked = this.allChecked; \n\n if (allChecked)\n this.uncheckAll();\n else\n this.checkAll();\n\n this.onModelChange(this.value);\n this.onChange.emit({ originalEvent: event, value: this.value }); \n this.updateFilledState();\n this.updateLabel();\n event.preventDefault();\n }\n\n checkAll() {\n let optionsToRender = this.optionsToRender;\n let val: any[] = [];\n\n optionsToRender.forEach(opt => {\n if (!this.group) {\n let optionDisabled = this.isOptionDisabled(opt); \n if (!optionDisabled || (optionDisabled && this.isSelected(opt))) {\n val.push(this.getOptionValue(opt));\n }\n }\n else {\n if (opt.items) {\n opt.items.forEach(option => {\n let optionDisabled = this.isOptionDisabled(option); \n if (!optionDisabled || (optionDisabled && this.isSelected(option))) {\n val.push(this.getOptionValue(option));\n }\n });\n }\n }\n });\n\n this.value = val;\n }\n\n uncheckAll() {\n let optionsToRender = this.optionsToRender;\n let val: any[] = [];\n\n optionsToRender.forEach(opt => {\n if (!this.group) {\n let optionDisabled = this.isOptionDisabled(opt); \n if (optionDisabled && this.isSelected(opt)) {\n val.push(this.getOptionValue(opt));\n }\n }\n else {\n if (opt.items) {\n opt.items.forEach(option => {\n let optionDisabled = this.isOptionDisabled(option); \n if (optionDisabled && this.isSelected(option)) {\n val.push(this.getOptionValue(option));\n }\n });\n }\n }\n });\n\n this.value = val;\n }\n\n show() {\n if (!this.overlayVisible){\n this.overlayVisible = true;\n }\n }\n\n onOverlayAnimationStart(event: AnimationEvent) {\n switch (event.toState) {\n case 'visible':\n this.overlay = event.element;\n this.appendOverlay();\n if (this.autoZIndex) {\n this.overlay.style.zIndex = String(this.baseZIndex + (++DomHandler.zindex));\n }\n this.alignOverlay();\n this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n this.bindScrollListener();\n\n if (this.filterInputChild && this.filterInputChild.nativeElement) {\n this.preventModelTouched = true;\n\n if (this.autofocusFilter) {\n this.filterInputChild.nativeElement.focus();\n }\n }\n\n this.onPanelShow.emit();\n break;\n\n case 'void':\n this.onOverlayHide();\n break;\n }\n }\n\n appendOverlay() {\n if (this.appendTo) {\n if (this.appendTo === 'body')\n document.body.appendChild(this.overlay);\n else\n DomHandler.appendChild(this.overlay, this.appendTo);\n\n if (!this.overlay.style.minWidth) {\n this.overlay.style.minWidth = DomHandler.getWidth(this.containerViewChild.nativeElement) + 'px';\n }\n }\n }\n\n restoreOverlayAppend() {\n if (this.overlay && this.appendTo) {\n this.el.nativeElement.appendChild(this.overlay);\n }\n }\n\n alignOverlay() {\n if (this.overlay) {\n if (this.appendTo)\n DomHandler.absolutePosition(this.overlay, this.containerViewChild.nativeElement);\n else\n DomHandler.relativePosition(this.overlay, this.containerViewChild.nativeElement);\n }\n }\n\n hide() {\n this.overlayVisible = false;\n this.unbindDocumentClickListener();\n if (this.resetFilterOnHide){\n this.filterInputChild.nativeElement.value = '';\n this._filterValue = null;\n this._filteredOptions = null;\n }\n this.onPanelHide.emit();\n this.cd.markForCheck();\n }\n\n close(event) {\n this.hide();\n event.preventDefault();\n event.stopPropagation();\n }\n\n onMouseclick(event: MouseEvent, input) {\n if (this.disabled || this.readonly || ( event.target).isSameNode(this.accessibleViewChild.nativeElement)) {\n return;\n }\n\n this.onClick.emit(event);\n\n if (!this.isOverlayClick(event) && !DomHandler.hasClass(event.target, 'p-multiselect-token-icon')) {\n if (this.overlayVisible) {\n this.hide();\n }\n else {\n input.focus();\n this.show();\n }\n }\n }\n\n removeChip(chip: any, event: MouseEvent) {\n this.value = this.value.filter(val => !ObjectUtils.equals(val, chip, this.dataKey));\n this.onModelChange(this.value);\n this.onChange.emit({ originalEvent: event, value: this.value });\n this.updateLabel();\n this.updateFilledState();\n }\n\n isOverlayClick(event: MouseEvent) {\n let targetNode = event.target;\n return this.overlay ? (this.overlay.isSameNode(targetNode) || this.overlay.contains(targetNode)) : false;\n }\n\n isOutsideClicked(event: MouseEvent): boolean {\n return !(this.el.nativeElement.isSameNode(event.target) || this.el.nativeElement.contains(event.target) || this.isOverlayClick(event));\n }\n\n onInputFocus(event) {\n this.focus = true;\n this.onFocus.emit({originalEvent: event});\n }\n\n onInputBlur(event) {\n this.focus = false;\n this.onBlur.emit({originalEvent: event});\n\n if (!this.preventModelTouched) {\n this.onModelTouched();\n }\n this.preventModelTouched = false;\n }\n\n onOptionKeydown(event) {\n if (this.readonly) {\n return;\n }\n\n switch(event.originalEvent.which) {\n\n //down\n case 40:\n var nextItem = this.findNextItem(event.originalEvent.target.parentElement);\n if (nextItem) {\n nextItem.focus();\n }\n\n event.originalEvent.preventDefault();\n break;\n\n //up\n case 38:\n var prevItem = this.findPrevItem(event.originalEvent.target.parentElement);\n if (prevItem) {\n prevItem.focus();\n }\n\n event.originalEvent.preventDefault();\n break;\n\n //enter\n case 13:\n this.onOptionClick(event);\n event.originalEvent.preventDefault();\n break;\n }\n }\n\n findNextItem(item) {\n let nextItem = item.nextElementSibling;\n\n if (nextItem)\n return DomHandler.hasClass(nextItem.children[0], 'p-disabled') || DomHandler.isHidden(nextItem.children[0]) || DomHandler.hasClass(nextItem, 'p-multiselect-item-group') ? this.findNextItem(nextItem) : nextItem.children[0];\n else\n return null;\n }\n\n findPrevItem(item) {\n let prevItem = item.previousElementSibling;\n\n if (prevItem)\n return DomHandler.hasClass(prevItem.children[0], 'p-disabled') || DomHandler.isHidden(prevItem.children[0]) || DomHandler.hasClass(prevItem, 'p-multiselect-item-group') ? this.findPrevItem(prevItem) : prevItem.children[0];\n else\n return null;\n }\n\n onKeydown(event: KeyboardEvent){\n switch(event.which) {\n //down\n case 40:\n if (!this.overlayVisible && event.altKey) {\n this.show();\n event.preventDefault();\n }\n break;\n\n //space\n case 32:\n if (!this.overlayVisible){\n this.show();\n event.preventDefault();\n }\n break;\n\n //escape\n case 27:\n this.hide();\n break;\n }\n }\n\n updateLabel() {\n if (this.value && this.options && this.value.length && this.displaySelectedLabel) {\n let label = '';\n for (let i = 0; i < this.value.length; i++) {\n let itemLabel = this.findLabelByValue(this.value[i]);\n if (itemLabel) {\n if (label.length > 0) {\n label = label + ', ';\n }\n label = label + itemLabel;\n }\n }\n\n if (this.value.length <= this.maxSelectedLabels) {\n this.valuesAsString = label;\n }\n else {\n let pattern = /{(.*?)}/;\n if (pattern.test(this.selectedItemsLabel)) {\n this.valuesAsString = this.selectedItemsLabel.replace(this.selectedItemsLabel.match(pattern)[0], this.value.length + '');\n } else {\n this.valuesAsString = this.selectedItemsLabel;\n }\n }\n }\n else {\n this.valuesAsString = this.placeholder || this.defaultLabel;\n }\n }\n\n findLabelByValue(val: any): string {\n if (this.group) {\n let label = null;\n\n for (let i = 0; i < this.options.length; i++) {\n if (this.options[i].items) {\n label = this.searchLabelByValue(val, this.options[i].items);\n\n if (label) {\n break;\n }\n }\n }\n\n return label;\n }\n else {\n return this.searchLabelByValue(val, this.options)\n }\n }\n\n searchLabelByValue(val: any, options: any[]): string {\n let label = null;\n\n for (let i = 0; i < options.length; i++) {\n let option = options[i];\n let optionValue = this.getOptionValue(option);\n\n if (val == null && optionValue == null || ObjectUtils.equals(val, optionValue, this.dataKey)) {\n label = this.getOptionLabel(option);\n break;\n }\n }\n\n return label;\n }\n\n get allChecked(): boolean {\n let optionsToRender = this.optionsToRender;\n if (!optionsToRender || optionsToRender.length === 0) {\n return false;\n }\n else {\n let selectedDisabledItemsLength = 0;\n let unselectedDisabledItemsLength = 0;\n let selectedEnabledItemsLength = 0;\n let visibleOptionsLength = this.group ? 0 : this.optionsToRender.length;\n \n for (let option of optionsToRender) {\n if (!this.group) {\n let disabled = this.isOptionDisabled(option);\n let selected = this.isSelected(option);\n \n if (disabled) {\n if (selected)\n selectedDisabledItemsLength++;\n else \n unselectedDisabledItemsLength++;\n }\n else {\n if (selected)\n selectedEnabledItemsLength++;\n else\n return false;\n }\n }\n else if (option.items) {\n for (let opt of option.items) {\n let disabled = this.isOptionDisabled(opt);\n let selected = this.isSelected(opt);\n \n if (disabled) {\n if (selected)\n selectedDisabledItemsLength++;\n else \n unselectedDisabledItemsLength++;\n }\n else {\n if (selected)\n selectedEnabledItemsLength++;\n else {\n return false;\n }\n }\n\n visibleOptionsLength++;\n }\n }\n }\n\n return (visibleOptionsLength === selectedDisabledItemsLength \n || visibleOptionsLength === selectedEnabledItemsLength \n || selectedEnabledItemsLength && visibleOptionsLength === (selectedEnabledItemsLength + unselectedDisabledItemsLength + selectedDisabledItemsLength));\n }\n }\n\n get optionsToRender(): any[] {\n return this._filteredOptions || this.options;\n }\n\n get emptyOptions(): boolean {\n let optionsToRender = this.optionsToRender;\n return !optionsToRender || optionsToRender.length === 0;\n }\n\n hasFilter() {\n return this._filterValue && this._filterValue.trim().length > 0; \n }\n\n onFilter(event: KeyboardEvent) {\n this._filterValue = ( event.target).value;\n this.activateFilter();\n }\n\n activateFilter() {\n if (this.hasFilter() && this._options) {\n let searchFields: string[] = (this.filterBy || this.optionLabel || 'label').split(',');\n if (this.group) {\n let searchFields: string[] = (this.optionLabel || 'label').split(',');\n\n let filteredGroups = [];\n for (let optgroup of this.options) {\n let filteredSubOptions = this.filterService.filter(this.getOptionGroupChildren(optgroup), searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);\n if (filteredSubOptions && filteredSubOptions.length) {\n filteredGroups.push({\n label: optgroup.label,\n value: optgroup.value,\n items: filteredSubOptions\n });\n }\n }\n\n this._filteredOptions = filteredGroups;\n }\n else {\n this._filteredOptions = this.filterService.filter(this.options, searchFields, this._filterValue, this.filterMatchMode, this.filterLocale); \n }\n }\n else {\n this._filteredOptions = null;\n }\n }\n\n onHeaderCheckboxFocus() {\n this.headerCheckboxFocus = true;\n }\n\n onHeaderCheckboxBlur() {\n this.headerCheckboxFocus = false;\n }\n\n bindDocumentClickListener() {\n if (!this.documentClickListener) {\n const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';\n\n this.documentClickListener = this.renderer.listen(documentTarget, 'click', (event) => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n });\n }\n }\n\n unbindDocumentClickListener() {\n if (this.documentClickListener) {\n this.documentClickListener();\n this.documentClickListener = null;\n }\n }\n\n bindDocumentResizeListener() {\n this.documentResizeListener = this.onWindowResize.bind(this);\n window.addEventListener('resize', this.documentResizeListener);\n }\n\n unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n\n onWindowResize() {\n if (!DomHandler.isAndroid()) {\n this.hide();\n }\n }\n\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.containerViewChild.nativeElement, () => {\n if (this.overlayVisible) {\n this.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n\n onOverlayHide() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n this.unbindScrollListener();\n this.overlay = null;\n this.onModelTouched();\n }\n\n ngOnDestroy() {\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n this.restoreOverlayAppend();\n this.onOverlayHide();\n }\n\n}\n\n@NgModule({\n imports: [CommonModule,SharedModule,ScrollingModule,TooltipModule,RippleModule],\n exports: [MultiSelect,SharedModule,ScrollingModule],\n declarations: [MultiSelect,MultiSelectItem]\n})\nexport class MultiSelectModule { }\n"]}