{"version":3,"file":"app-50459300.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAAA;AAGA;AAFA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AAEA;AAmBA;AAAA;AAGA;AAAA;AACA;AAAA;AAOA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAjCA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAjQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AA9FA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACrBA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AAEA;AAOA;AAAA;AAAA;AAJA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AArCA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACPA;AAEA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AAEA;AAMA;AAAA;AAJA;AAKA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AAEA;AAQA;AAAA;AAAA;AAAA;AAAA;AAHA;AAIA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/CA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACTA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AAEA;AASA;AAAA;AAAA;AAAA;AAAA;AAJA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAxCA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;;;ACHA;AACA;AACA;AACA","sources":["webpack://www.zeusteam.com/./src/resources/elements/placement-details/placement-details.js","webpack://www.zeusteam.com/./src/resources/elements/placement-percentage/placement-percentage.js","webpack://www.zeusteam.com/./src/resources/elements/policy-autocomplete/policy-autocomplete.js","webpack://www.zeusteam.com/./src/resources/elements/policy-list/policy-list.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/beneficiary.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/coverage-option.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/insured.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/owner.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/payor.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-mini-summary.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary-notes.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary-splits.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary.js","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/requirement.js","webpack://www.zeusteam.com/./src/resources/elements/policy/policy-number.js","webpack://www.zeusteam.com/./src/resources/elements/policy-autocomplete/policy-autocomplete.scss","webpack://www.zeusteam.com/./src/resources/elements/policy/policy-number.scss","webpack://www.zeusteam.com/./src/resources/elements/placement-details/placement-details.html","webpack://www.zeusteam.com/./src/resources/elements/placement-percentage/placement-percentage.html","webpack://www.zeusteam.com/./src/resources/elements/policy-autocomplete/policy-autocomplete.html","webpack://www.zeusteam.com/./src/resources/elements/policy-list/policy-list.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/beneficiary.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/coverage-option.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/insured.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/owner.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/payor.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-mini-summary.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary-notes.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary-splits.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/policy-summary.html","webpack://www.zeusteam.com/./src/resources/elements/policy-summary/requirement.html","webpack://www.zeusteam.com/./src/resources/elements/policy/policy-number.html"],"sourcesContent":["import { bindable } from 'aurelia-framework';\r\nexport class PlacementDetails {\r\n @bindable data;\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nexport class PlacementPercentage {\r\n @bindable data;\r\n @bindable showFormula = false;\r\n}\r\n","import { customElement, computedFrom, bindable, bindingMode } from 'aurelia-framework';\r\nimport { DOM } from 'aurelia-pal';\r\nimport { Api } from 'common/server';\r\nimport { LineOfBusinessValueConverter } from 'resources/value-converters/line-of-business';\r\n\r\n@customElement('policy-autocomplete')\r\nexport class PolicyAutocomplete {\r\n static inject = [DOM.Element, Api, LineOfBusinessValueConverter];\r\n _api;\r\n _lobValueConverter;\r\n lastFindPromise;\r\n justSelected = false;\r\n previousValue = null;\r\n initial = true;\r\n\r\n dropdownToggle;\r\n dropdownMenu;\r\n\r\n showResults = false;\r\n\r\n @bindable attachFocus = true;\r\n @bindable name = '';\r\n @bindable minInput = 3;\r\n @bindable debounce = 500;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) value = '';\r\n @bindable policyNumber;\r\n @bindable selected;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) result = null;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) results = [];\r\n @bindable label = result => {\r\n if (!result) return '';\r\n return `${result.carrier}: ${result.client}, ${result.policyNumber} (${this._lobValueConverter.toView(result.lineOfBusiness)}); $${result.submittedPremium}; ${result.writingAgent.fullName}`;\r\n };\r\n @bindable forDownline;\r\n\r\n showDropdown() {\r\n if (!this.dropdownMenu.hasClass('show') && this.dropdownToggle && this.dropdownToggle.dropdown) {\r\n this.dropdownToggle.dropdown('toggle');\r\n }\r\n }\r\n\r\n constructor(element, api, lobValueConverter) {\r\n this.element = element;\r\n this._api = api;\r\n this._lobValueConverter = lobValueConverter;\r\n }\r\n\r\n bind() {\r\n this.loadIfOne = false;\r\n if (this.policyNumber) {\r\n this.initial = false;\r\n this.loadIfOne = true;\r\n this.value = this.policyNumber;\r\n }\r\n else {\r\n this.value = this.label(this.result);\r\n }\r\n this.dropdownToggle = $(this.dropdownToggle);\r\n this.dropdownMenu = $(this.dropdownToggle.parent().find('.dropdown-menu')[0]);\r\n }\r\n\r\n setFocus(value, event) {\r\n function isDescendant(parent, child) {\r\n let node = child.parentNode;\r\n\r\n while (node !== null) {\r\n if (node === parent) return true;\r\n node = node.parentNode;\r\n }\r\n return false;\r\n }\r\n\r\n // If descendant, don't toggle dropdown so that other listeners will be called.\r\n if (event && event.relatedTarget && isDescendant(this.element, event.relatedTarget)) return true;\r\n\r\n if (value) return this.valueChanged();\r\n this.showResults = value;\r\n }\r\n\r\n labelWithMatches(result) {\r\n let label = this.label(result);\r\n if (typeof label !== 'string') {\r\n return '';\r\n }\r\n\r\n return label.replace(this.regex, match => {\r\n return `${match}`;\r\n });\r\n }\r\n\r\n handleKeyUp(event) {\r\n if (event.keyCode !== 27) return;\r\n if (this.showResults) event.stopPropagation();\r\n this.setFocus(false);\r\n return true;\r\n }\r\n\r\n handleKeyDown(event) {\r\n if (event.keyCode === 27) return;\r\n\r\n if (event.keyCode === 40 || event.keyCode === 38) {\r\n this.selected = this.nextFoundResult(this.selected, event.keyCode === 38);\r\n return event.preventDefault();\r\n }\r\n\r\n if (event.keyCode === 9 || event.keyCode === 13) {\r\n if (this.showResults) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n\r\n if (this.results.length !== 0 && this.showResults) {\r\n this.onSelect();\r\n }\r\n } else if (event.keyCode !== 37 && event.keyCode !== 39) {\r\n // ensure dropdown is uncollapsed when there are results while user types\r\n if (this.results.length > 0) {\r\n this.showDropdown();\r\n }\r\n this.setFocus(true);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n nextFoundResult(current, reversed) {\r\n let index = (this.results.indexOf(current) + (reversed ? -1 : 1)) % (this.results.length);\r\n\r\n if (index < 0) index = this.results.length - 1;\r\n\r\n return this.results[index];\r\n }\r\n\r\n /**\r\n * Set the text in the input to that of the selected item and set the\r\n * selected item as the value. Then hide the results(dropdown)\r\n *\r\n * @param {Object} [result] when defined uses the result instead of the this.selected value\r\n *\r\n * @returns {boolean}\r\n */\r\n onSelect(result) {\r\n result = (arguments.length === 0) ? this.selected : result;\r\n this.justSelected = true;\r\n this.value = this.label(result);\r\n this.previousValue = this.value;\r\n this.selected = result;\r\n this.result = result;\r\n\r\n this.setFocus(false);\r\n\r\n return true;\r\n }\r\n\r\n resultChanged() {\r\n if (this.selected !== this.result) {\r\n this.onSelect(this.result);\r\n }\r\n }\r\n\r\n sort(items) {\r\n return items;\r\n }\r\n\r\n /**\r\n * when search string changes perform a request, assign it to results\r\n * and select the first result by default.\r\n *\r\n * @returns {Promise}\r\n */\r\n valueChanged() {\r\n let initial = this.initial;\r\n let justSelected = this.justSelected;\r\n\r\n if (!this.shouldPerformRequest()) {\r\n this.previousValue = this.value;\r\n if (justSelected) {\r\n this.showResults = false;\r\n } else {\r\n this.showResults = !initial && !(this.results.length === 0);\r\n }\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n this.result = null;\r\n\r\n if (!this.hasEnoughCharacters()) {\r\n this.results = [];\r\n this.previousValue = this.value;\r\n this.showResults = false;\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n this.showResults = true;\r\n\r\n // when resource is not defined it will not perform a request. Instead it\r\n // will search for the first items that pass the predicate\r\n if (this.items) {\r\n this.results = this.sort(this.items);\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n let lastFindPromise = this.findResults(this.searchQuery(this.value))\r\n .then(results => {\r\n if (this.lastFindPromise !== lastFindPromise) {\r\n return;\r\n }\r\n\r\n this.previousValue = this.value;\r\n this.lastFindPromise = false;\r\n this.results = this.sort(results || []);\r\n\r\n if (this.results.length !== 0) {\r\n this.selected = this.results[0];\r\n\r\n if (this.loadIfOne) {\r\n this.onSelect(this.selected);\r\n }\r\n }\r\n });\r\n\r\n this.lastFindPromise = lastFindPromise;\r\n }\r\n\r\n @computedFrom('value')\r\n get regex() {\r\n return new RegExp(this.value, 'gi');\r\n }\r\n\r\n /**\r\n * returns true when a request will be performed on a search change\r\n *\r\n * @returns {Boolean}\r\n */\r\n shouldPerformRequest() {\r\n if (this.justSelected === true) {\r\n this.justSelected = false;\r\n return false;\r\n }\r\n\r\n if (this.initial) {\r\n this.initial = false;\r\n return false;\r\n }\r\n\r\n return this.value !== this.previousValue;\r\n }\r\n\r\n /**\r\n * Returns whether or not value has enough characters (meets minInput).\r\n *\r\n * @returns {boolean}\r\n */\r\n hasEnoughCharacters() {\r\n return ((this.value && this.value.length) || 0) >= this.minInput;\r\n }\r\n\r\n async findResults(query) {\r\n try {\r\n return this._api.post('policy/autocomplete-search', query);\r\n } catch (err) {\r\n console.log('ERROR', err);\r\n }\r\n }\r\n\r\n searchQuery(string) {\r\n // For now, only searching based on policy number\r\n let payload = {\r\n searchOn: string\r\n };\r\n if (this.forDownline) payload.forDownline = true;\r\n\r\n return payload;\r\n }\r\n}\r\n","import { bindable, computedFrom } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { ProductionService } from 'services/production-service';\r\nimport { Security } from 'common/security';\r\nimport { Notes } from 'services/notes';\r\nimport { c } from 'common/common';\r\nimport moment from 'moment';\r\nimport { Capacitor } from '@capacitor/core';\r\n\r\nexport class PolicyList {\r\n static inject = [EventAggregator, ProductionService, Security, Notes];\r\n @bindable policies;\r\n @bindable policyPremiumType = 'submitted';\r\n @bindable scroll = false;\r\n @bindable policyListType = 'submitted';\r\n @bindable policyStatuses;\r\n @bindable showName = 'client';\r\n @bindable pageSize = 10;\r\n @bindable delayLoad = false;\r\n @bindable finalColumn = 'note';\r\n @bindable theme = '';\r\n @bindable dateType = 'submitted';\r\n\r\n _ea;\r\n _productionService;\r\n _security;\r\n _notes;\r\n showDrawer = false;\r\n policyNote;\r\n showNoneFound = true;\r\n\r\n policyFilters = [{ value: '', keys: ['submittedDate', 'client', 'writingAgent.fullName', 'policyNumber', 'carrier', 'carrierCode', 'submittedPremium', 'statusName', 'client'] }];\r\n\r\n constructor(ea, productionService, security, notes) {\r\n this._ea = ea;\r\n this._productionService = productionService;\r\n this._security = security;\r\n this._notes = notes;\r\n }\r\n\r\n policiesChanged() {\r\n if (!this.policies) {\r\n this.policies = [];\r\n if (!this.delayLoad) this.loading = true;\r\n return;\r\n }\r\n this.loading = false;\r\n this.showNoneFound = true;\r\n }\r\n \r\n delayLoadChanged() {\r\n if (this.loading && this.delayLoad) {\r\n this.loading = false;\r\n this.showNoneFound = false;\r\n }\r\n }\r\n\r\n @computedFrom('policy', 'policyPremiumType')\r\n get policyPremium() {\r\n if (!this.policy) return '';\r\n console.log\r\n switch (this.policyPremiumType) {\r\n case 'submitted': return this.policy.submittedPremium;\r\n case 'paid': return this.policy.paidPremium;\r\n default: return '';\r\n }\r\n }\r\n\r\n addComment(ev, policy) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n this.policy = policy;\r\n this.showAddPolicyNote = true;\r\n this.showDrawer = moment().format();\r\n }\r\n\r\n closePolicyNote() {\r\n this.policy.mostRecentNoteDate = moment().toISOString();\r\n this.showDrawer = undefined;\r\n this.showAddPolicyNote = false;\r\n }\r\n\r\n policyNoteUpdated(policy) {\r\n policy.mostRecentNoteDate = moment().toISOString();\r\n }\r\n\r\n toggleMiniPolicySummary(ev, policy) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n if (Capacitor.isNativePlatform()) {\r\n this.showPolicyDetails(policy);\r\n return;\r\n }\r\n policy.showMiniSummary = !policy.showMiniSummary;\r\n return false;\r\n }\r\n\r\n showPolicyDetails(policy) {\r\n\t\tthis._ea.publish(c.EventKeys.site.openPolicy, { policyId: policy.id });\r\n }\r\n\r\n drawerClosed() {\r\n this.policy = undefined;\r\n this.showAddPolicyNote = false;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nexport class Beneficiary {\r\n @bindable beneficiary;\r\n}","import { bindable } from 'aurelia-framework';\r\nexport class CoverageOption {\r\n @bindable option;\r\n}","import { bindable } from 'aurelia-framework';\r\nexport class Insured {\r\n @bindable insured;\r\n}","import { bindable } from 'aurelia-framework';\r\nexport class Owner {\r\n @bindable owner;\r\n}","import { bindable } from 'aurelia-framework';\r\nexport class Payor {\r\n @bindable payor;\r\n}","import { bindable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { ProductionService } from 'services/production-service';\r\nimport { c } from 'common/common';\r\n\r\nexport class PolicyMiniSummary {\r\n static inject = [Element, EventAggregator, ProductionService];\r\n @bindable policyId;\r\n _element;\r\n _production;\r\n _ea;\r\n\r\n constructor(element, ea, production) {\r\n this._element = element;\r\n this._ea = ea;\r\n this._production = production;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n if (!this.policyId) return;\r\n try {\r\n this.policy = await this._production.policy(this.policyId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n closeSummary() {\r\n this._element.dispatchEvent(new CustomEvent('close', { bubbles: true, detail: {} }));\r\n }\r\n\r\n openProfile(event, member) {\r\n if (event) event.stopPropagation();\r\n this._ea.publish(c.EventKeys.site.openProfile, { memberId: member.id });\r\n return false;\r\n }\r\n\r\n noteUpdated() {\r\n this._element.dispatchEvent(new CustomEvent('noteupdated', { bubbles: true, detail: {} }));\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\n\r\nexport class PolicySummaryNotes {\r\n @bindable notes;\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { ProductionService } from 'services/production-service';\r\n\r\nexport class PolicySummarySplits {\r\n static inject = [ProductionService];\r\n _production;\r\n\r\n @bindable policyId;\r\n\r\n constructor(production) {\r\n this._production = production;\r\n }\r\n\r\n policyIdChanged() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n try {\r\n if (!this.policyId) return;\r\n this.splits = await this._production.policySplits(this.policyId);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}","import { bindable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { ProductionService } from 'services/production-service';\r\nimport { c } from 'common/common';\r\n\r\nexport class PolicySummary {\r\n static inject = [EventAggregator, ProductionService];\r\n @bindable policyId;\r\n @bindable policy;\r\n @bindable showPolicyNumberIcon = false;\r\n _production;\r\n _ea;\r\n\r\n constructor(ea, production) {\r\n this._ea = ea;\r\n this._production = production;\r\n }\r\n\r\n attached() {\r\n this._load();\r\n }\r\n\r\n async _load() {\r\n if (!this.policyId && !this.policy) return;\r\n try {\r\n if (this.policyId) {\r\n this.policy = await this._production.policy(this.policyId);\r\n }\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n openProfile(event, member) {\r\n if (event) event.stopPropagation();\r\n this._ea.publish(c.EventKeys.site.openProfile, { memberId: member.id });\r\n return false;\r\n }\r\n\r\n hasCredit(value) {\r\n if (value === undefined || value === null) return false;\r\n return true;\r\n }\r\n\r\n async switchSplit() {\r\n try {\r\n const splits = await this._production.policySplits(this.policy.id);\r\n if (!splits || !splits.length) return;\r\n this.policyId = splits[0].id;\r\n this._load();\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nexport class Requirement {\r\n @bindable requirement;\r\n}","import { bindable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { ProductionService } from 'services/production-service';\r\nimport { c } from 'common/common';\r\n\r\nexport class PolicyNumber {\r\n static inject = [EventAggregator, ProductionService];\r\n @bindable policy;\r\n @bindable showIcon = true;\r\n @bindable tab;\r\n _ea;\r\n _production;\r\n showMultiple = false;\r\n\r\n constructor(ea, production) {\r\n this._ea = ea;\r\n this._production = production;\r\n }\r\n\r\n async policyChanged() {\r\n if (!this.policy) return;\r\n this.policyId = this.policy.id;\r\n this.policyNumber = this.policy.policyNumber;\r\n if (!this.policyId) {\r\n try {\r\n this.showMultiple = false;\r\n const policies = await this._production.policyByNumber(this.policyNumber);\r\n if (!policies || !policies.length) return;\r\n if (policies.length === 1) {\r\n this.policyId = policies[0].id;\r\n return;\r\n }\r\n // More than 1...list them all with writing agents\r\n this.showMultiple = true;\r\n this.policies = policies;\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n }\r\n\r\n openPolicy(ev, p) {\r\n ev.stopPropagation();\r\n ev.preventDefault();\r\n const id = p ? p.id : this.policyId;\r\n this._ea.publish(c.EventKeys.site.openPolicy, { policyId: id, tab: this.tab });\r\n }\r\n}\r\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-autocomplete-results {\\n width: 100%;\\n padding: var(--zeus-margin);\\n background-color: #ccc;\\n}\\n\\n.zeus-autocomplete-no-results {\\n padding: 5px 15px 5px 15px;\\n text-align: center;\\n font-style: italic;\\n}\\n\\n.zeus-autocomplete-searching {\\n padding: 5px 15px 0 15px;\\n text-align: center;\\n font-style: italic;\\n}\\n\\n.zeus-autocomplete-result {\\n padding: 0 var(--zeus-margin);\\n}\\n\\n.zeus-autocomplete-option {\\n padding: 0 var(--zeus-margin-xs);\\n}\\n.zeus-autocomplete-option.active {\\n background-color: var(--kt-primary-light);\\n}\\n.zeus-autocomplete-option:hover {\\n cursor: pointer;\\n}\\n.zeus-autocomplete-option > a {\\n color: black;\\n text-decoration: none;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/policy-autocomplete/policy-autocomplete.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,WAAA;EACA,2BAAA;EACA,sBAAA;AACJ;;AAEA;EACI,0BAAA;EACA,kBAAA;EACA,kBAAA;AACJ;;AAEA;EACI,wBAAA;EACA,kBAAA;EACA,kBAAA;AACJ;;AAEA;EACI,6BAAA;AACJ;;AAEA;EACI,gCAAA;AACJ;AACI;EACI,yCAAA;AACR;AAEI;EACI,eAAA;AAAR;AAGI;EACI,YAAA;EACA,qBAAA;AADR\",\"sourcesContent\":[\".zeus-autocomplete-results {\\r\\n width: 100%;\\r\\n padding: var(--zeus-margin);\\r\\n background-color: #ccc;\\r\\n}\\r\\n\\r\\n.zeus-autocomplete-no-results {\\r\\n padding: 5px 15px 5px 15px;\\r\\n text-align: center;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.zeus-autocomplete-searching {\\r\\n padding: 5px 15px 0 15px;\\r\\n text-align: center;\\r\\n font-style: italic;\\r\\n}\\r\\n\\r\\n.zeus-autocomplete-result {\\r\\n padding: 0 var(--zeus-margin);\\r\\n}\\r\\n\\r\\n.zeus-autocomplete-option {\\r\\n padding: 0 var(--zeus-margin-xs);\\r\\n\\r\\n &.active {\\r\\n background-color: var(--kt-primary-light);\\r\\n }\\r\\n\\r\\n &:hover {\\r\\n cursor: pointer;\\r\\n }\\r\\n\\r\\n > a {\\r\\n color: black;\\r\\n text-decoration: none;\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".zeus-policy-number {\\n position: relative;\\n display: inline-flex;\\n align-items: center;\\n}\\n.zeus-policy-number copy-to-clipboard {\\n position: absolute;\\n top: 0;\\n right: 0;\\n background-color: white;\\n border-radius: 12px;\\n width: 25px;\\n height: 25px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.zeus-policy-icon {\\n font-size: 24px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/policy/policy-number.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,kBAAA;EACA,oBAAA;EACA,mBAAA;AACJ;AACI;EACI,kBAAA;EACA,MAAA;EACA,QAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;AACR;;AAGA;EACI,eAAA;AAAJ\",\"sourcesContent\":[\".zeus-policy-number {\\r\\n position: relative;\\r\\n display: inline-flex;\\r\\n align-items: center;\\r\\n\\r\\n copy-to-clipboard {\\r\\n position: absolute;\\r\\n top: 0;\\r\\n right: 0;\\r\\n background-color: white;\\r\\n border-radius: 12px;\\r\\n width: 25px;\\r\\n height: 25px;\\r\\n display: flex;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-policy-icon {\\r\\n font-size: 24px;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}