{"version":3,"file":"app-61f3eb59.9729664bca28a8e6916d.bundle.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AAMA;AAAA;AAJA;AACA;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAhBA;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AAEA;AAKA;AAAA;AAHA;AAIA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AA3BA;;;;;;;;;;;;;;;;;;;ACLA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACFA;AACA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AA4BA;AAAA;AA1BA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AAjaA;;;;;;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AAEA;AAUA;AAAA;AARA;AAAA;AAAA;AAKA;AAIA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AA/EA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;ACTA;AAEA;AAAA;AAAA;AAAA;AAEA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AAEA;AAoBA;AAAA;AAlBA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;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;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AA/FA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACPA;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","sources":["webpack://www.zeusteam.com/./src/resources/elements/quick-actions/quick-actions-button.js","webpack://www.zeusteam.com/./src/resources/elements/quick-links/quick-links-button.js","webpack://www.zeusteam.com/./src/resources/elements/refresh-icon/refresh-icon.js","webpack://www.zeusteam.com/./src/resources/elements/ryg/ryg-icon.js","webpack://www.zeusteam.com/./src/resources/elements/search/search.js","webpack://www.zeusteam.com/./src/resources/elements/sparkline/sparkline.js","webpack://www.zeusteam.com/./src/resources/elements/spinner/spinner.js","webpack://www.zeusteam.com/./src/resources/elements/tags/tags.js","webpack://www.zeusteam.com/./src/resources/elements/quick-actions/quick-actions-button.scss","webpack://www.zeusteam.com/./src/resources/elements/search/search.scss","webpack://www.zeusteam.com/./src/resources/elements/sparkline/sparkline.scss","webpack://www.zeusteam.com/./src/resources/elements/tags/tags.scss","webpack://www.zeusteam.com/./src/resources/elements/quick-actions/quick-actions-button.html","webpack://www.zeusteam.com/./src/resources/elements/quick-links/quick-links-button.html","webpack://www.zeusteam.com/./src/resources/elements/refresh-icon/refresh-icon.html","webpack://www.zeusteam.com/./src/resources/elements/ryg/ryg-icon.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-agent.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-carrier.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-file.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-policy.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-product.html","webpack://www.zeusteam.com/./src/resources/elements/search/search-result-web-page.html","webpack://www.zeusteam.com/./src/resources/elements/search/search.html","webpack://www.zeusteam.com/./src/resources/elements/sparkline/sparkline.html","webpack://www.zeusteam.com/./src/resources/elements/spinner/spinner.html","webpack://www.zeusteam.com/./src/resources/elements/tags/tags.html"],"sourcesContent":["import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Config } from 'services/config';\r\nimport { c } from 'common/common';\r\n\r\nexport class QuickActionsButton {\r\n static inject = [EventAggregator, Security, Config];\r\n _ea;\r\n security;\r\n _config;\r\n\r\n constructor(ea, security, config) {\r\n this._ea = ea;\r\n this.security = security;\r\n this.nbrUrl = this._config.value('newBusinessReportingLinkTemplate');\r\n }\r\n\r\n openNbr() {\r\n const nbrLink = c.Helpers.replaceVariables(this.security, this.nbrUrl, true);\r\n this._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: nbrLink });\r\n }\r\n}","import { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Security } from 'common/security';\r\nimport { Config } from 'services/config';\r\nimport { c } from 'common/common';\r\n\r\nexport class QuickLinksButton {\r\n static inject = [EventAggregator, Security, Config];\r\n _ea;\r\n security;\r\n\r\n constructor(ea, security, config) {\r\n this._ea = ea;\r\n this.security = security;\r\n this._config = config;\r\n this.nbrUrl = this._config.value('newBusinessReportingLinkTemplate');\r\n }\r\n \r\n openNbr() {\r\n const nbrLink = c.Helpers.replaceVariables(this.security, this.nbrUrl, true);\r\n this._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: nbrLink });\r\n this._closeMenu();\r\n }\r\n\r\n shareMyLink() {\r\n this.security.openShareLink(this._config);\r\n this._closeMenu();\r\n }\r\n\r\n _closeMenu() {\r\n this.closeMenu = new Date().getTime();\r\n return true;\r\n }\r\n}","import { bindable } from 'aurelia-framework';\r\nexport class RefreshIcon {\r\n @bindable refreshing = false;\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nexport class RygIcon {\r\n @bindable color;\r\n}\r\n","import { Router } from 'aurelia-router';\r\nimport { EventAggregator } from 'aurelia-event-aggregator'\r\nimport { Api } from 'common/server';\r\nimport { Security } from 'common/security';\r\nimport { LpfnUtil } from 'common/utils';\r\nimport { eventListener } from 'common/common';\r\nimport { c } from 'common/common';\r\n\r\nexport class Search {\r\n static inject = [Element, Router, EventAggregator, Api, Security];\r\n element;\r\n _router;\r\n _ea;\r\n _api;\r\n _security;\r\n\r\n RECENT_LS_KEY = 'zeus-search-recent';\r\n MAX_RECENT_RESULTS = 25;\r\n\r\n menuTriggerEventKey = 'zeus-search-menu';\r\n\r\n _defaultOptions = {\r\n minLength: 2,\r\n keypress: true,\r\n enter: true,\r\n layout: 'menu',\r\n responsive: null,\r\n showOnFocus: true,\r\n };\r\n\r\n options = {};\r\n\r\n searchOn = '';\r\n\r\n _handlers = [];\r\n\r\n constructor(element, router, ea, api, security) {\r\n this.element = element;\r\n this._router = router;\r\n this._ea = ea;\r\n this._api = api;\r\n this.security = security;\r\n }\r\n\r\n attached() {\r\n this._init();\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n openPolicy(policy) {\r\n this._ea.publish(c.EventKeys.site.openPolicy, { policyId: policy.id });\r\n }\r\n\r\n openAgent(agent) {\r\n\t\tthis._ea.publish(c.EventKeys.site.openProfile, { memberId: agent.id });\r\n }\r\n\r\n _init() {\r\n this.RECENT_LS_KEY = `zeus-search-recent-${this.security.authenticatedMemberId}`;\r\n this.options = LpfnUtil.deepExtend({}, this._defaultOptions, this.options);\r\n this.processing = false;\r\n\r\n this.element.setAttribute('data-kt-search', 'true');\r\n this.layout = this._getOption('layout');\r\n \r\n this._update();\r\n\r\n this._loadRecentResults();\r\n\r\n this._handlers.push(eventListener(window, 'resize', (e) => {\r\n let timer;\r\n LpfnUtil.throttle(timer, () => { this._update(); }, 200);\r\n }));\r\n }\r\n\r\n focus() {\r\n this.inputEl.removeAttribute('readonly');\r\n this.element.classList.add('focus');\r\n if (this._getOption('show-on-focus') === true || this.searchOn.length >= minLength) {\r\n this.show();\r\n } \r\n }\r\n\r\n blur() { \r\n this.element.classList.remove('focus');\r\n }\r\n\r\n keypress(e) {\r\n // suppress the enter key so it doesn't submit the form and reload the page\r\n var key = e.charCode || e.keyCode || 0;\r\n if (key === 13) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n keyup(e) {\r\n this._typing = true;\r\n const minLengthOption = this._getOption('min-length');\r\n var key = e.charCode || e.keyCode || 0;\r\n if (key == 13) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.search();\r\n return false;\r\n }\r\n if (!minLengthOption) {\r\n return false;\r\n }\r\n\r\n const minLength = parseInt(minLengthOption);\r\n\r\n if (this.searchOn.length >= minLength ) {\r\n this.search();\r\n } else if (this.searchOn.length === 0) {\r\n this.clear();\r\n }\r\n return true;\r\n }\r\n\r\n menuClosed() {\r\n this.hide();\r\n }\r\n\r\n async search() {\r\n if (this.processing) return;\r\n this.searchComplete = false;\r\n this.showSearchResults = false;\r\n\r\n // Focus input\r\n this.inputEl.focus();\r\n\r\n this.processing = true;\r\n\r\n try {\r\n if (!this.searchOn) return;\r\n this.searching = true;\r\n const results = await this._api.get(`search?term=${encodeURIComponent(this.searchOn)}`);\r\n this.policies = results.filter(x => x.resultType === 'policy');\r\n let i = 0;\r\n this.policies.forEach(x => x.show = i++ < 3);\r\n this.agents = results.filter(x => x.resultType === 'agent');\r\n i = 0;\r\n this.agents.forEach(x => x.show = i++ < 3);\r\n this.carriers = results.filter(x => x.resultType === 'carrier');\r\n i = 0;\r\n this.carriers.forEach(x => x.show = i++ < 3);\r\n this.products = results.filter(x => x.resultType === 'product');\r\n i = 0;\r\n this.products.forEach(x => x.show = i++ < 3);\r\n this.webPages = results.filter(x => x.resultType === 'web-page');\r\n i = 0;\r\n this.webPages.forEach(x => x.show = i++ < 3);\r\n this.files = results.filter(x => x.resultType === 'file');\r\n i = 0;\r\n this.files.forEach(x => x.show = i++ < 3);\r\n this._saveRecentResults(results);\r\n\r\n this.showSearchResults = this.policies.length || this.agents.length || this.carriers.length || this.products.length || this.webPages.length || this.files.length;\r\n this.showEmptySearchResults = !this.showSearchResults;\r\n this.complete();\r\n } catch (err) {\r\n console.log(err);\r\n this.processing = false;\r\n this.showRecentSearches = true;\r\n this.searchComplete = true;\r\n } finally {\r\n this.searching = false;\r\n }\r\n }\r\n\r\n openRecentResult(result) {\r\n switch (result.resultType) {\r\n case 'policy':\r\n this.openPolicy(result);\r\n break;\r\n case 'agent':\r\n this.openAgent(result);\r\n break;\r\n case 'carrier':\r\n this.hide();\r\n this._router.navigate(`#/members/carriers/${result.metadata.slug}`, true);\r\n break;\r\n case 'product':\r\n this.hide();\r\n this._router.navigate(`#/members/carriers/${result.metadata.carrierSlug}`, true);\r\n break;\r\n case 'web-page':\r\n this.hide();\r\n this._router.navigate(result.metadata.url);\r\n break;\r\n case 'file':\r\n this.hide();\r\n this.openFile(result);\r\n break;\r\n }\r\n }\r\n\r\n openFile(file) {\r\n this._ea.publish(c.EventKeys.site.openLightbox, { embedSrc: file.metadata.url });\r\n }\r\n\r\n _loadRecentResults() {\r\n try {\r\n const recentResultsValue = localStorage.getItem(this.RECENT_LS_KEY);\r\n this.recentResults = recentResultsValue ? JSON.parse(recentResultsValue) : [];\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _saveRecentResults(results) {\r\n try {\r\n results.forEach(r => this.recentResults.unshift(r));\r\n if (this.recentResults.length > this.MAX_RECENT_RESULTS) {\r\n this.recentResults.splice(this.MAX_RECENT_RESULTS);\r\n }\r\n const filteredRecentResults = [];\r\n this.recentResults.forEach(rr => {\r\n const exists = filteredRecentResults.find(x => x.resultType === rr.resultType && x.id === rr.id);\r\n if (exists) return;\r\n filteredRecentResults.push(rr);\r\n });\r\n this.recentResults = filteredRecentResults;\r\n localStorage.setItem(this.RECENT_LS_KEY, JSON.stringify(this.recentResults));\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n clearRecentResults() {\r\n this.recentResults = [];\r\n localStorage.setItem(this.RECENT_LS_KEY, JSON.stringify(this.recentResults));\r\n }\r\n\r\n complete() {\r\n if (this.searchOn.length === 0) {\r\n this.clear();\r\n }\r\n\r\n // Focus input\r\n this.inputEl.focus();\r\n\r\n this.show();\r\n\r\n this.processing = false;\r\n this.showRecentSearches = false;\r\n this.searchComplete = true;\r\n }\r\n\r\n clear() {\r\n // Clear and focus input\r\n this.searchOn = '';\r\n this.inputEl.focus();\r\n this.searchComplete = false;\r\n this.showSearch = true;\r\n this.showRecentSearches = true;\r\n this.showSearchResults = false;\r\n this.showEmptySearchResults = false;\r\n this.showingSearch = false;\r\n\r\n if (this._getOption('show-on-focus') === false ) {\r\n this.hide();\r\n }\r\n }\r\n\r\n _update() {\r\n // Handle responsive form\r\n var responsiveFormMode = this._getResponsiveFormMode();\r\n\r\n if (responsiveFormMode === 'on' && this.contentEl.contains(this.formEl) === false) {\r\n this.contentEl.prepend(this.formEl);\r\n this.formEl.classList.remove('d-none'); \r\n } else if (responsiveFormMode === 'off' && this.contentEl.contains(this.formEl) === true) {\r\n this.element.prepend(this.formEl);\r\n this.formEl.classList.add('d-none');\r\n }\r\n }\r\n\r\n toggle() {\r\n if (!this.showingSearch) {\r\n this.showSearchInResults = true;\r\n this.show();\r\n } else {\r\n this.showSearchInResults = false;\r\n this.hide();\r\n }\r\n }\r\n\r\n show() {\r\n this._ea.publish(this.menuTriggerEventKey, { action: 'show' });\r\n this.showSearch = true;\r\n this.showRecentSearches = true;\r\n this.showingSearch = true;\r\n this._update();\r\n }\r\n\r\n hide() {\r\n this._ea.publish(this.menuTriggerEventKey, { action: 'hide' });\r\n this.showSearch = true;\r\n this.showingSearch = false;\r\n this.searchComplete = false;\r\n this.showRecentSearches = true;\r\n this.showSearchResults = false;\r\n this.showEmptySearchResults = false;\r\n this.showAdvancedSearchOptions = false;\r\n this.showSearchInResults = false;\r\n this._update();\r\n return true;\r\n }\r\n\r\n showAdvancedSearch() {\r\n this.showSearch = false;\r\n this.showAdvancedSearchOptions = true;\r\n }\r\n\r\n cancelAdvancedSearch() {\r\n this.showSearch = true;\r\n this.showAdvancedSearchOptions = false;\r\n }\r\n\r\n showSearchPreferences() {\r\n this.showSearch = false;\r\n this.showSearchPreferencesPanel = true;\r\n }\r\n\r\n saveSearchPreferences() {\r\n console.log('save search preferences');\r\n }\r\n\r\n closeSearchPreferences() {\r\n this.showSearchPreferencesPanel = false;\r\n this.showSearch = true;\r\n }\r\n\r\n _getOption(name) {\r\n if (this.element.hasAttribute('data-kt-search-' + name) === true) {\r\n var attr = this.element.getAttribute('data-kt-search-' + name);\r\n var value = LpfnUtil.getResponsiveValue(attr);\r\n\r\n if (value !== null && String(value) === 'true') {\r\n value = true;\r\n } else if (value !== null && String(value) === 'false') {\r\n value = false;\r\n }\r\n\r\n return value;\r\n } else {\r\n var optionName = LpfnUtil.snakeToCamel(name);\r\n\r\n if (this.options[optionName]) {\r\n return LpfnUtil.getResponsiveValue(this.options[optionName]);\r\n } else {\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n _getResponsiveFormMode() {\r\n var responsive = this._getOption('responsive');\r\n if (!responsive) return null;\r\n\r\n var width = LpfnUtil.getViewPort().width;\r\n var breakpoint = LpfnUtil.getBreakpoint(responsive);\r\n\r\n if (!breakpoint) {\r\n breakpoint = parseInt(responsive);\r\n }\r\n\r\n if (width < breakpoint) {\r\n return \"on\";\r\n } else {\r\n return \"off\";\r\n }\r\n }\r\n\r\n destroy() {\r\n }\r\n\r\n showAgent(index) {\r\n if (index <= 3) return true;\r\n return this.displayAgents;\r\n }\r\n\r\n toggleResults(type, event) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n let i = 0;\r\n switch (type) {\r\n case 'agents':\r\n this.displayAgents = !this.displayAgents;\r\n this.agents.forEach(x => x.show = this.displayAgents || i++ < 3);\r\n break;\r\n case 'web-pages':\r\n this.displayWebPages = !this.displayWebPages;\r\n this.webPages.forEach(x => x.show = this.displayWebPages || i++ < 3);\r\n break;\r\n case 'files':\r\n this.displayFiles = !this.displayFiles;\r\n this.files.forEach(x => x.show = this.displayFiles || i++ < 3);\r\n break;\r\n case 'carriers':\r\n this.displayCarriers = !this.displayCarriers;\r\n this.carriers.forEach(x => x.show = this.displayCarriers || i++ < 3);\r\n break;\r\n case 'products':\r\n this.displayProducts = !this.displayProducts;\r\n this.products.forEach(x => x.show = this.displayProducts || i++ < 3);\r\n break;\r\n case 'policies':\r\n this.displayPolicies = !this.displayPolicies;\r\n this.policies.forEach(x => x.show = this.displayPolicies || i++ < 3);\r\n break;\r\n }\r\n return false;\r\n }\r\n\r\n onCancelClick() {\r\n this.hide();\r\n return true;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\nimport { I18n } from 'common/i18n';\r\nimport Chart from 'chart.js/auto';\r\n\r\nexport class Sparkline {\r\n static inject = [I18n];\r\n _i18n;\r\n\r\n @bindable data;\r\n @bindable size;\r\n\r\n chartEl;\r\n _chart;\r\n\r\n constructor(i18n) {\r\n this._i18n = i18n;\r\n }\r\n\r\n attached() {\r\n this._loadChart();\r\n }\r\n\r\n dataChanged() {\r\n this._loadChart();\r\n }\r\n\r\n _loadChart() {\r\n if (!this.data || !this.chartEl) return;\r\n try {\r\n const labels = [];\r\n const sparklineData = [];\r\n let i = 1; \r\n this.data.forEach(d => {\r\n if (typeof d === 'number') sparklineData.push(d);\r\n else if (typeof d.value === 'number') sparklineData.push(d.value);\r\n else sparklineData.push(d);\r\n labels.push(i++);\r\n });\r\n const data = {\r\n labels,\r\n datasets: [\r\n { \r\n data: sparklineData,\r\n borderColor: '#cccccc',\r\n borderWidth: 2,\r\n fill: false\r\n }\r\n ]\r\n };\r\n const config = {\r\n type: 'line',\r\n data: data,\r\n options: {\r\n title: false,\r\n responsive: true,\r\n aspectRatio: 3,\r\n elements: {\r\n point: { radius: 0 }\r\n },\r\n scales: {\r\n x: {\r\n display: false,\r\n grid: { display: false }\r\n },\r\n y: {\r\n display: false,\r\n grid: { display: false }\r\n }\r\n },\r\n plugins: {\r\n legend: { display: false },\r\n title: { display: false }\r\n }\r\n },\r\n };\r\n\r\n if (this._chart) {\r\n this._chart.data.datasets = data.datasets;\r\n this._chart.update();\r\n return;\r\n }\r\n\r\n this._chart = new Chart(this.chartEl, config);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\n\r\nexport class Spinner {\r\n @bindable spinning = false;\r\n}\r\n","import { bindable, observable } from 'aurelia-framework';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport { Tags as TagService } from 'services/tags';\r\nimport { distinctArray } from 'common/common';\r\nimport Tagify from '@yaireo/tagify';\r\n\r\nexport class Tags {\r\n static inject = [Element, EventAggregator, TagService];\r\n _element;\r\n _ea;\r\n _tags;\r\n\r\n _tagify;\r\n tagsEl;\r\n @observable tagList;\r\n\r\n @bindable tagOptions;\r\n\r\n @bindable type;\r\n @bindable referenceId;\r\n @bindable tags;\r\n @bindable maxItems = 10;\r\n @bindable onlyAllowTagOptions = false;\r\n\r\n _handlers = [];\r\n\r\n constructor(element, ea, tags) {\r\n this._element = element;\r\n this._ea = ea;\r\n this._tags = tags;\r\n }\r\n\r\n attached() {\r\n this._handlers.push(this._ea.subscribe('zeus.tags.updated', (data) => this._updateWhitelist(data.type, data.tags)));\r\n this._initialize();\r\n }\r\n\r\n detached() {\r\n this._handlers.forEach(h => h.dispose());\r\n this._handlers = [];\r\n }\r\n\r\n tagOptionsChanged(newValue, oldValue) {\r\n if (!newValue && !oldValue) return;\r\n if (this._tagify) {\r\n this._tagify.destroy();\r\n this._tagify = undefined;\r\n }\r\n this._initialize();\r\n }\r\n\r\n async _initialize() {\r\n if (!this.tagsEl) return;\r\n try {\r\n if (!this.type) {\r\n if (!this.tags) this.tags = [];\r\n this.tagList = this.tags.join(',');\r\n this.availableTags = this.tagOptions ?? [];\r\n\r\n if (this._tagify) {\r\n this._updateWhitelist(null, this.availableTags);\r\n return;\r\n }\r\n } else {\r\n if (!this.tags && this.referenceId) this.tags = await this._tags.list(this.type, this.referenceId);\r\n if (this.tags) this.tagList = this.tags.join(',');\r\n this.availableTags = await this._tags.list(this.type);\r\n }\r\n this._tagify = new Tagify(this.tagsEl, {\r\n whitelist: this.availableTags,\r\n enforceWhitelist: this.onlyAllowTagOptions,\r\n dropdown: {\r\n enabled: 0,\r\n maxItems: this.maxItems,\r\n }\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n\r\n _updateWhitelist(tagType, tags) {\r\n if (!this._tagify) return;\r\n if (this.type && tagType !== this.type) return;\r\n const existing = this._tagify.whitelist;\r\n const newWhitelist = distinctArray([...existing, ...tags]);\r\n this._tagify.whitelist = newWhitelist;\r\n }\r\n\r\n tagsChanged() {\r\n if (this.tags) this.tagList = this.tags.join(',');\r\n }\r\n\r\n async tagListChanged() {\r\n if (!this._tagListInitialized) { this._tagListInitialized = true; return; }\r\n try {\r\n const tags = this.tagList ? JSON.parse(this.tagList).map(x => x.value) : [];\r\n if (!this.type) {\r\n // for tag options, just publish an event\r\n this._element.dispatchEvent(new CustomEvent('updated', { bubbles: true, detail: tags }));\r\n } else {\r\n // When these are tag options, do not assign\r\n await this._tags.assign(this.type, this.referenceId, tags);\r\n this._ea.publish('zeus.tags.updated', { type: this.type, tags: tags });\r\n }\r\n } catch (err) {\r\n console.log(err);\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-bunny {\\n height: 35px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/quick-actions/quick-actions-button.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,YAAA;AACJ\",\"sourcesContent\":[\".zeus-bunny {\\r\\n height: 35px;\\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, \"search dropdown-menu {\\n width: 100%;\\n}\\n\\n.zeus-search-icon {\\n align-self: flex-start;\\n}\\n.zeus-search-icon i {\\n font-size: 40px;\\n}\\n\\n.zeus-search-admin-button {\\n align-self: flex-start;\\n margin-right: var(--zeus-space-xs);\\n}\\n\\n.zeus-search-info {\\n display: flex;\\n justify-content: space-between;\\n flex: 2;\\n margin-right: var(--zeus-space-sm);\\n}\\n\\n.zeus-search-header {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n}\\n\\n.zeus-result-link {\\n display: flex;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/search/search.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,WAAA;AACJ;;AAEA;EACI,sBAAA;AACJ;AACI;EACI,eAAA;AACR;;AAGA;EACI,sBAAA;EACA,kCAAA;AAAJ;;AAGA;EACI,aAAA;EACA,8BAAA;EACA,OAAA;EACA,kCAAA;AAAJ;;AAGA;EACI,aAAA;EACA,mBAAA;EACA,8BAAA;AAAJ;;AAGA;EACI,aAAA;AAAJ\",\"sourcesContent\":[\"search dropdown-menu {\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.zeus-search-icon {\\r\\n align-self: flex-start;\\r\\n\\r\\n i {\\r\\n font-size: 40px;\\r\\n }\\r\\n}\\r\\n\\r\\n.zeus-search-admin-button {\\r\\n align-self: flex-start;\\r\\n margin-right: var(--zeus-space-xs);\\r\\n}\\r\\n\\r\\n.zeus-search-info {\\r\\n display: flex;\\r\\n justify-content: space-between;\\r\\n flex: 2;\\r\\n margin-right: var(--zeus-space-sm);\\r\\n}\\r\\n\\r\\n.zeus-search-header {\\r\\n display: flex;\\r\\n align-items: center;\\r\\n justify-content: space-between;\\r\\n}\\r\\n\\r\\n.zeus-result-link {\\r\\n display: flex;\\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-sparkline-chart {\\n width: 80px;\\n height: 26px;\\n margin: auto;\\n}\\n.zeus-sparkline-chart canvas {\\n width: 80px;\\n height: 26px;\\n}\\n.zeus-sparkline-chart.sm {\\n width: 60px;\\n height: 19px;\\n}\\n.zeus-sparkline-chart.sm canvas {\\n width: 60px;\\n height: 19px;\\n}\\n.zeus-sparkline-chart.xs {\\n width: 40px;\\n height: 13px;\\n}\\n.zeus-sparkline-chart.xs canvas {\\n width: 40px;\\n height: 13px;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/sparkline/sparkline.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,WAAA;EACA,YAAA;EACA,YAAA;AACJ;AACI;EACI,WAAA;EACA,YAAA;AACR;AAEI;EACI,WAAA;EACA,YAAA;AAAR;AAEQ;EACI,WAAA;EACA,YAAA;AAAZ;AAII;EACI,WAAA;EACA,YAAA;AAFR;AAIQ;EACI,WAAA;EACA,YAAA;AAFZ\",\"sourcesContent\":[\".zeus-sparkline-chart {\\r\\n width: 80px;\\r\\n height: 26px;\\r\\n margin: auto;\\r\\n\\r\\n canvas {\\r\\n width: 80px;\\r\\n height: 26px;\\r\\n }\\r\\n\\r\\n &.sm {\\r\\n width: 60px;\\r\\n height: 19px;\\r\\n\\r\\n canvas {\\r\\n width: 60px;\\r\\n height: 19px;\\r\\n }\\r\\n }\\r\\n\\r\\n &.xs {\\r\\n width: 40px;\\r\\n height: 13px;\\r\\n\\r\\n canvas {\\r\\n width: 40px;\\r\\n height: 13px;\\r\\n }\\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, \"tag {\\n border-radius: var(--zeus-space-sm);\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/resources/elements/tags/tags.scss\"],\"names\":[],\"mappings\":\"AAAA;EACI,mCAAA;AACJ\",\"sourcesContent\":[\"tag {\\r\\n border-radius: var(--zeus-space-sm);\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"/static/files/img/nbr/nbr-bunny.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\nvar code = \"\";\n// Exports\nexport default code;","// Imports\nimport ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from \"../../../../node_modules/html-loader/dist/runtime/getUrl.js\";\nvar ___HTML_LOADER_IMPORT_0___ = new URL(\"/static/files/img/nbr/nbr-bunny.png\", import.meta.url);\n// Module\nvar ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___);\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 = \"\";\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 = \"\";\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;"],"names":[],"sourceRoot":""}