@hmcts/rpx-xui-common-lib 1.8.7-fix-wrong-services → 1.8.8-angular-upgrade-r4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/bundles/hmcts-rpx-xui-common-lib.umd.js +919 -201
  2. package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
  3. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
  4. package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-rpx-xui-common-lib.js +32 -29
  6. package/esm2015/lib/components/find-location/find-location.component.js +8 -4
  7. package/esm2015/lib/components/find-service/find-service.component.js +2 -2
  8. package/esm2015/lib/components/find-task-name/find-task-name.component.js +228 -0
  9. package/esm2015/lib/components/generic-filter/generic-filter-utils.js +2 -2
  10. package/esm2015/lib/components/generic-filter/generic-filter.component.js +361 -15
  11. package/esm2015/lib/components/search-location/search-location.component.js +3 -3
  12. package/esm2015/lib/components/search-service/search-service.component.js +18 -6
  13. package/esm2015/lib/exui-common-lib.module.js +12 -3
  14. package/esm2015/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +80 -6
  15. package/esm2015/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
  16. package/esm2015/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
  17. package/esm2015/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
  18. package/esm2015/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
  19. package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
  20. package/esm2015/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +19 -14
  21. package/esm2015/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
  22. package/esm2015/lib/gov-ui/components/index.js +2 -2
  23. package/esm2015/lib/gov-ui/components/public_api.js +2 -1
  24. package/esm2015/lib/gov-ui/index.js +2 -2
  25. package/esm2015/lib/gov-ui/models/checkboxes-model.js +6 -8
  26. package/esm2015/lib/gov-ui/models/gov-ui-config-model.js +5 -1
  27. package/esm2015/lib/gov-ui/models/public_api.js +1 -2
  28. package/esm2015/lib/gov-ui/models/radio-buttons.model.js +22 -0
  29. package/esm2015/lib/gov-ui/public_api.js +2 -2
  30. package/esm2015/lib/models/filter.model.js +63 -3
  31. package/esm2015/lib/models/index.js +3 -2
  32. package/esm2015/lib/models/person.model.js +2 -2
  33. package/esm2015/lib/models/task-name.model.js +16 -0
  34. package/esm2015/lib/pipes/capitalize.pipe.js +21 -0
  35. package/esm2015/lib/services/filter/filter.service.js +17 -3
  36. package/esm2015/lib/services/find-person/find-person.service.js +3 -3
  37. package/esm2015/lib/services/role-guard/role.guard.js +22 -15
  38. package/esm2015/lib/services/role-guard/role.service.js +13 -13
  39. package/esm2015/lib/services/storage/session-storage/session-storage.service.js +55 -0
  40. package/esm2015/lib/services/task-name/task-name.service.js +65 -0
  41. package/esm2015/public-api.js +3 -3
  42. package/esm5/hmcts-rpx-xui-common-lib.js +32 -29
  43. package/esm5/lib/components/find-location/find-location.component.js +8 -4
  44. package/esm5/lib/components/find-service/find-service.component.js +2 -2
  45. package/esm5/lib/components/find-task-name/find-task-name.component.js +243 -0
  46. package/esm5/lib/components/generic-filter/generic-filter-utils.js +2 -2
  47. package/esm5/lib/components/generic-filter/generic-filter.component.js +397 -14
  48. package/esm5/lib/components/search-location/search-location.component.js +3 -3
  49. package/esm5/lib/components/search-service/search-service.component.js +20 -7
  50. package/esm5/lib/exui-common-lib.module.js +10 -3
  51. package/esm5/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.js +100 -6
  52. package/esm5/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.js +3 -3
  53. package/esm5/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.js +3 -2
  54. package/esm5/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.js +1 -1
  55. package/esm5/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.js +2 -2
  56. package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.js +22 -0
  57. package/esm5/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.js +17 -13
  58. package/esm5/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.js +2 -2
  59. package/esm5/lib/gov-ui/components/index.js +2 -2
  60. package/esm5/lib/gov-ui/components/public_api.js +2 -1
  61. package/esm5/lib/gov-ui/index.js +2 -2
  62. package/esm5/lib/gov-ui/models/checkboxes-model.js +6 -8
  63. package/esm5/lib/gov-ui/models/gov-ui-config-model.js +5 -1
  64. package/esm5/lib/gov-ui/models/public_api.js +1 -2
  65. package/esm5/lib/gov-ui/models/radio-buttons.model.js +22 -0
  66. package/esm5/lib/gov-ui/public_api.js +2 -2
  67. package/esm5/lib/models/filter.model.js +63 -3
  68. package/esm5/lib/models/index.js +3 -2
  69. package/esm5/lib/models/person.model.js +2 -2
  70. package/esm5/lib/models/task-name.model.js +16 -0
  71. package/esm5/lib/pipes/capitalize.pipe.js +29 -0
  72. package/esm5/lib/services/filter/filter.service.js +21 -3
  73. package/esm5/lib/services/find-person/find-person.service.js +3 -3
  74. package/esm5/lib/services/role-guard/role.guard.js +22 -15
  75. package/esm5/lib/services/role-guard/role.service.js +13 -13
  76. package/esm5/lib/services/{session-storage → storage/session-storage}/session-storage.service.js +2 -2
  77. package/esm5/lib/services/task-name/task-name.service.js +70 -0
  78. package/esm5/public-api.js +3 -3
  79. package/fesm2015/hmcts-rpx-xui-common-lib.js +782 -115
  80. package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
  81. package/fesm5/hmcts-rpx-xui-common-lib.js +908 -158
  82. package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
  83. package/hmcts-rpx-xui-common-lib.d.ts +30 -27
  84. package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
  85. package/lib/components/find-task-name/find-task-name.component.d.ts +41 -0
  86. package/lib/components/generic-filter/generic-filter-utils.d.ts +2 -5
  87. package/lib/components/generic-filter/generic-filter.component.d.ts +12 -2
  88. package/lib/components/search-location/search-location.component.d.ts +1 -1
  89. package/lib/components/search-service/search-service.component.d.ts +5 -2
  90. package/lib/exui-common-lib.module.d.ts +4 -3
  91. package/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.d.ts +14 -5
  92. package/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.d.ts +1 -2
  93. package/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.d.ts +1 -0
  94. package/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.d.ts +2 -2
  95. package/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.d.ts +7 -0
  96. package/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.d.ts +4 -2
  97. package/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.d.ts +3 -3
  98. package/lib/gov-ui/components/public_api.d.ts +1 -0
  99. package/lib/gov-ui/models/checkboxes-model.d.ts +4 -7
  100. package/lib/gov-ui/models/gov-ui-config-model.d.ts +2 -0
  101. package/lib/gov-ui/models/public_api.d.ts +0 -1
  102. package/lib/gov-ui/models/radio-buttons.model.d.ts +9 -0
  103. package/lib/models/filter.model.d.ts +29 -7
  104. package/lib/models/index.d.ts +1 -0
  105. package/lib/models/person.model.d.ts +1 -1
  106. package/lib/models/task-name.model.d.ts +4 -0
  107. package/lib/pipes/capitalize.pipe.d.ts +4 -0
  108. package/lib/services/filter/filter.service.d.ts +1 -0
  109. package/lib/services/find-person/find-person.service.d.ts +1 -1
  110. package/lib/services/role-guard/role.guard.d.ts +2 -1
  111. package/lib/services/role-guard/role.service.d.ts +3 -1
  112. package/lib/services/{session-storage → storage/session-storage}/session-storage.service.d.ts +0 -0
  113. package/lib/services/task-name/task-name.service.d.ts +14 -0
  114. package/package.json +1 -1
  115. package/esm2015/lib/gov-ui/models/banner-data-model.js +0 -16
  116. package/esm2015/lib/services/session-storage/session-storage.service.js +0 -55
  117. package/esm5/lib/gov-ui/models/banner-data-model.js +0 -16
  118. package/lib/gov-ui/models/banner-data-model.d.ts +0 -4
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/material/autocomplete"),require("@angular/material/input"),require("@angular/material/tabs"),require("ngx-pagination"),require("@angular/common/http"),require("@angular/forms"),require("launchdarkly-js-client-sdk"),require("@angular/common"),require("@angular/platform-browser"),require("@ng-idle/core"),require("@ng-idle/keepalive"),require("@angular/router"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@hmcts/rpx-xui-common-lib",["exports","@angular/material/autocomplete","@angular/material/input","@angular/material/tabs","ngx-pagination","@angular/common/http","@angular/forms","launchdarkly-js-client-sdk","@angular/common","@angular/platform-browser","@ng-idle/core","@ng-idle/keepalive","@angular/router","@angular/core","rxjs","rxjs/operators"],t):t((e.hmcts=e.hmcts||{},e.hmcts["rpx-xui-common-lib"]={}),e.ng.material.autocomplete,e.ng.material.input,e.ng.material.tabs,e.ngxPagination,e.ng.common.http,e.ng.forms,e.LDClient,e.ng.common,e.ng.platformBrowser,e.i1$1,e.i2$1,e.ng.router,e.ng.core,e.rxjs,e.rxjs.operators)}(this,function(e,t,n,o,i,s,d,r,a,l,c,u,p,g,h,m){"use strict";var f=(v.decorators=[{type:g.Component,args:[{selector:"xuilib-accessibility",template:'<h1 class="govuk-heading-xl" id="Accessibility-statement-for-Expert-UI">Accessibility statement for Expert UI</h1>\n\n<ul class="govuk-list">\n <li><a href="accessibility#immigration">Immigration and Asylum</a></li>\n <li><a href="accessibility#family">Family Public Law </a></li>\n</ul>\n\n<p class="govuk-body">This website is run by HM Courts & Tribunals Service. We want as many people as possible to be\n able to use this website. For example, you should be able to:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>change colours, contrast levels and fonts</li>\n <li>zoom in up to 300% without the text spilling off the screen</li>\n <li>navigate most of the website using just a keyboard</li>\n <li>navigate most of the website using speech recognition software</li>\n <li>listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and\n VoiceOver)\n </li>\n</ul>\n\n<p class="govuk-body">We’ve also made the website text as simple as possible to understand.</p>\n\n<p class="govuk-body"><a rel="noopener noreferrer" target="_blank" href="https://mcmw.abilitynet.org.uk/">AbilityNet</a>\n has advice on making your device easier to use if you have a disability.</p>\n\n<h2 class="govuk-heading-l" id="How-accessible-this-website-is">How accessible this website is</h2>\n\n<p class="govuk-body">We know some parts of the website are not fully accessible:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>some pages are difficult to navigate using just a keyboard</li>\n <li>some pages can’t be listened to in full using a screen reader</li>\n <li>some pages have problems with colour contrasts between text and background</li>\n <li>some PDFs may not be fully accessible to a screen reader</li>\n</ul>\n\n<h2 class="govuk-heading-l" id="What-to-do-if-you-cannot-access-parts-of-this-website">Feedback and contact\n information</h2>\n\n<p class="govuk-body">If you need information on this website in a different format like accessible PDF, large print,\n easy read, audio recording or braille, you can:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>email: <a href="mailto:HMCTSforms@justice.gov.uk"> HMCTSforms@justice.gov.uk</a></li>\n <li>call: +44 (0) 300 123 1711</li>\n <li>contact your service representative</li>\n</ul>\n\n<p class="govuk-body">We’ll consider your request and get back to you in 10 working days.</p>\n\n<h2 class="govuk-heading-l" id="Reporting-accessibility-problems-with-this-website">Reporting accessibility problems\n with this website</h2>\n\n<p class="govuk-body">We’re always looking to improve the accessibility of this website. If you find any problems not\n listed on this page or think we’re not meeting accessibility requirements, contact:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>email: <a href="mailto:customer.service@justice.gov.uk"> customer.service@justice.gov.uk</a></li>\n <li>telephone: +44 (0) 300 123 1711</li>\n</ul>\n\n<h2 class="govuk-heading-l" id="Enforcement-procedure ">Enforcement procedure</h2>\n\n<p class="govuk-body">The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector\n Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the ‘accessibility\n regulations’). </p>\n\n<p class="govuk-body">If you’re not happy with how we respond to your complaint, <a rel="noopener noreferrer"\n target="_blank"\n href="https://www.equalityadvisoryservice.com/">contact\n the Equality Advisory and Support Service (EASS).</a></p>\n\n<h1 class="govuk-heading-l" id="Contacting-us-by-phone-or-visiting-us-in-person">Contacting us by phone or visiting us\n in person</h1>\n\n<p class="govuk-body">We provide a text relay service for people who are D/deaf, hearing impaired or have a speech\n impediment.</p>\n\n<p class="govuk-body">Our offices and tribunal venues have audio induction loops, or if you contact us before your visit\n we can arrange a British Sign Language (BSL) interpreter. You can also request step-free access or a foreign language\n interpreter.</p>\n\n<p class="govuk-body">If you have a question about accessibility in our Tribunal venues, you can contact the First-tier\n Tribunal enquiry line: +44 (0) 300 123 1711. You can <a target="_blank"\n href="https://courttribunalfinder.service.gov.uk/search/">find\n the contact details for court and tribunal venues</a>. </p>\n\n<p class="govuk-body">You can also contact your service representative for more information.</p>\n\n<h1 class="govuk-heading-l" id="Technical-information-about-this-website’s-accessibility">Technical information about\n this website’s accessibility</h1>\n\n<p class="govuk-body">HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies\n (Websites and Mobile Applications) (No.2) Accessibility Regulations 2018.</p>\n\n<p class="govuk-body">This website is partially compliant with the <a rel="noopener noreferrer" target="_blank"\n href="https://www.w3.org/TR/WCAG21/">Web Content\n Accessibility Guidelines version 2.1</a>, due to the non-compliances listed below.</p>\n\n<h1 class="govuk-heading-l" id="Non-accessible-content">Non-accessible content </h1>\n\n<p class="govuk-body">The content listed below is non-compliant for the following reasons.</p>\n\n<h2 class="govuk-heading-l" id="Non-compliance-with-the-accessibility-regulations">Non-compliance with the accessibility\n regulations</h2>\n\n<p class="govuk-body">Some pages cannot be navigated completely using just a keyboard, so some people won’t be able to\n tab through the pages. This fails WCAG 2.1 success criterion 2.1 (keyboard accessible).</p>\n\n<p class="govuk-body">Some pages can’t be listened to in full using a screen reader, so some people won’t be able to\n access the information. This fails WCAG 2.1 success criterion 1.2.5 (audio description – prerecorded).</p>\n\n<p class="govuk-body">Some of the contrast ratios don’t meet the current accessibility requirements. This fails WCAG 2.1\n success criterion 1.4.3 (contrast – minimum).</p>\n\n<h3 class="govuk-heading-m" id="immigration">Immigration and Asylum</h3>\n\n<p class="govuk-body">Some of the images on the service include text and are not accessible for some low vision users.\n We have identified a solution for this issue that we will implement as soon as possible.</p>\n\n<h3 class="govuk-heading-m" id="family">Family Public Law </h3>\n\n<ol class="govuk-list govuk-list--alpha">\n <li>The navigation system used in family public law cannot be rendered well by screen readers, so features can’t be\n listened to in full\n </li>\n <li>Some essential functions within the family public law digital service cannot be accessed properly using screen\n readers\n </li>\n <li>Some complex forms within the service will not be rendered correctly or cannot be listened to by screen readers\n </li>\n</ol>\n\n<h2 class="govuk-heading-m" id="Disproportionate burden ">Disproportionate burden </h2>\n\n<p class="govuk-body">For Manage organisation, Register organisation, Approve organisations and Manage cases, we found\n the following issues that are currently being triaged to find out if there is a disproportionate burden:</p>\n\n<ol class="govuk-list govuk-list--alpha">\n <li>Screen readers can’t switch between headers, read content in tabs and buttons</li>\n <li>Screen readers can’t tab between radio buttons, read links or content</li>\n <li>Colour contrast ratios uneven between page background and content</li>\n <li>Some labels, fields, error messages and other content can’t be clearly identified by screen readers and voice\n activation software\n </li>\n <li>Some page headings and titles don’t follow a logical structure for screen readers</li>\n <li>The navigation of some pages isn’t clear</li>\n <li>Some headings, links and button labels aren’t clearly descriptive</li>\n</ol>\n\n<h2 class="govuk-heading-m" id="Content-that’s-not-within-the-scope-of-the-accessibility-regulations">Content that’s not\n within the scope of the accessibility regulations </h2>\n\n<p class="govuk-body">PDFs, documents and attachments to email notifications published before 23 September 2018 may not\n meet accessibility standards. For example, they may not be structured so they’re accessible to a screen reader.</p>\n\n<p class="govuk-body">Any new PDFs or Word documents we publish will meet accessibility standards.</p>\n\n<h1 class="govuk-heading-l" id="what-to-improve-accessibility">What we’re doing to improve accessibility</h1>\n\n<p class="govuk-body">We’re committed to ensuring our services are accessible to all our users and that they comply with\n level AA of the Web Content Accessibility Guidelines – WCAG 2.1.</p>\n\n<p class="govuk-body">We’re actively working to improve the identified issues and make them AA-compliant by 23 September\n 2020. We’re also continuing to improve all other AAA-level accessibility issues as we iterate the service.</p>\n\n<h1 class="govuk-heading-l" id="preparation-of-this-accessibility-statement">Preparation of this accessibility\n statement</h1>\n\n<p class="govuk-body">This statement was prepared on 16 September 2019. It was last reviewed on 16 September 2020.</p>\n\n<p class="govuk-body">This website was last tested on 19 May 2020. The test was carried out by the <a target="_blank"\n href="https://digitalaccessibilitycentre.org/">Digital\n Accessibility Centre (DAC)</a>.</p>\n\n<h3 class="govuk-heading-m">Family Private Law:</h3>\n\n<p class="govuk-body">This service has not yet been tested for accessibility issues. In the future, we will conduct an\n accessibility audit in order to find out if there are any accessibility issues. The accessibility statement will be\n updated with any relevant changes that we find.</p>\n\n<p class="govuk-body">If there are any issues with accessing information or using this website please contact:</p>\n\n<ol class="govuk-list govuk-list--bullet">\n <li>Nicola Whitcher - 02380 384324</li>\n <li>Hannah Townley - 02380 384313</li>\n</ol>',styles:[".govuk-list--alpha{padding-left:20px;list-style-type:lower-alpha}"]}]}],v.ctorParameters=function(){return[]},v);function v(){}var b=function(){return(b=Object.assign||function b(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&o>=e.length?void 0:e)&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,s=n.call(e),r=[];try{for(;(void 0===t||0<t--)&&!(o=s.next()).done;)r.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=s["return"])&&n.call(s)}finally{if(i)throw i.error}}return r}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(k(arguments[t]));return e}var I=(Object.defineProperty(w.prototype,"selection",{get:function(){return this.pSelection?C(this.pSelection):[]},set:function(e){this.pSelection=this.getSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"allSelected",{get:function(){return this.selection.length===this.options.length},enumerable:!0,configurable:!0}),w.prototype.ngOnChanges=function(){this.setupPreselection(),this.checkSelection()},Object.defineProperty(w.prototype,"hasOptions",{get:function(){return this.options&&0<this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"isFunctional",{get:function(){return this.labelFunction&&this.hasOptions},enumerable:!0,configurable:!0}),w.prototype.isSelected=function(e){return this.selection.includes(e)},w.prototype.toggleItemSelection=function(e){this.pSelection===undefined?this.pSelection=[e]:this.isSelected(e)?this.pSelection.splice(this.pSelection.indexOf(e),1):this.pSelection.push(e),this.pSelectionMade=!0,this.selectionChange.emit(this.selection)},w.prototype.toggleSelectAll=function(){this.allSelected?this.pSelection=[]:this.pSelection=C(this.options),this.pSelectionMade=!0,this.selectionChange.emit(this.pSelection)},w.prototype.containsItem=function(e,t){var n=this;if(this.isFunctional){var o=this.labelFunction(t);return e.some(function(e){return n.labelFunction(e)===o})}return!1},Object.defineProperty(w.prototype,"hasPreselection",{get:function(){return this.preselection&&0<this.preselection.length},enumerable:!0,configurable:!0}),w.prototype.setupPreselection=function(){var e,t=this;this.isFunctional&&!this.pSelectionMade&&this.hasPreselection&&(e=!0,(e=this.pSelection?0<this.pSelection.filter(function(e){return!t.containsItem(t.preselection,e)}).length:e)&&(this.pSelection=this.getSelection(this.preselection),this.selectionChange.emit(this.selection)))},w.prototype.getSelection=function(t){var n=this;return C(this.options.filter(function(e){return n.containsItem(t,e)}))},w.prototype.checkSelection=function(){var e,t=this;!this.isFunctional||(e=this.selection.filter(function(e){return t.containsItem(t.options,e)})).length!==this.selection.length&&(this.pSelection=C(e),this.selectionChange.emit(this.selection))},w.decorators=[{type:g.Component,args:[{selector:"xuilib-checkbox-list",template:'<div class="xui-checkbox-list govuk-checkboxes govuk-checkboxes--small" *ngIf="isFunctional">\n <div class="select-all govuk-checkboxes__item">\n <input type="checkbox" id="select_all" class="govuk-checkboxes__input" [checked]="allSelected"\n (change)="toggleSelectAll()" />\n <label for="select_all" class="govuk-label govuk-checkboxes__label">Select all / Deselect all</label>\n </div>\n <div class="checkbox-items">\n <div *ngFor="let item of options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" [id]="\'select_\' + i" class="govuk-checkboxes__input" [checked]="isSelected(item)"\n (change)="toggleItemSelection(item)" />\n <label [for]="\'select_\' + i" class="govuk-label govuk-checkboxes__label">{{labelFunction(item)}}</label>\n </div>\n </div>\n</div>\n',encapsulation:g.ViewEncapsulation.None,styles:[".xui-checkbox-list .select-all{margin-bottom:10px}.xui-checkbox-list .checkbox-items{display:flex;flex-direction:column;flex-wrap:wrap;height:100%;max-height:100%;align-items:flex-start;align-content:flex-start;width:100%;max-width:100%;overflow-x:scroll}"]}]}],w.propDecorators={options:[{type:g.Input}],preselection:[{type:g.Input}],labelFunction:[{type:g.Input}],selectionChange:[{type:g.Output}],selection:[{type:g.Input}]},w);function w(){this.options=[],this.selectionChange=new g.EventEmitter}var _=(x.decorators=[{type:g.Component,args:[{selector:"xuilib-contact-details",template:'<div class="contact-details" *ngIf="data">\n <h3 class="govuk-heading-m" *ngIf="data.title">{{ data.title }}</h3>\n <p *ngIf="data.badgeText"><span [className]="\'hmcts-badge \' + data.badgeColour">{{ data.badgeText }}</span></p>\n <div class="email" *ngIf="data.email"><span class="govuk-!-font-weight-bold">Email: </span> <a href="mailto:{{ data.email }}">{{ data.email }}</a></div>\n <div class="phone" *ngIf="data.phone"><span class="govuk-!-font-weight-bold">Phone: </span>{{ data.phone }}</div>\n <div class="opening-times" *ngIf="data.openingTimes"><span class="govuk-!-font-weight-bold">Opening times: </span>{{ data.openingTimes}}</div>\n</div>\n\n',styles:[".contact-details{margin-top:30px}.contact-details h3,.contact-details p{margin-bottom:10px}"]}]}],x.ctorParameters=function(){return[]},x.propDecorators={data:[{type:g.Input}]},x);function x(){}var S={RED:"hmcts-badge--red",ORANGE:"hmcts-badge--orange",GREEN:"hmcts-badge--green"},L=(Object.defineProperty(E.prototype,"badge",{get:function(){return this.pBadge},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"label",{get:function(){return this.pLabel},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"accessibleLabel",{get:function(){return this.pAccessibleLabel},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"daysDiff",{get:function(){return this.pDaysDiff},enumerable:!0,configurable:!0}),E.prototype.ngOnChanges=function(){this.handleInputChanges()},E.prototype.handleInputChanges=function(){var e;this.dueDate&&(this.pDaysDiff=this.getDaysDifference(this.dueDate,new Date),0<this.daysDiff?(this.pBadge=S.RED,e=1===this.daysDiff?"day":"days",this.pLabel="+"+this.daysDiff+" "+e,this.pAccessibleLabel="This task is "+this.daysDiff+" "+e+" past its due date"):(0===this.daysDiff?(this.pLabel="TODAY",this.pAccessibleLabel="This task is due to be completed today"):(this.pLabel=""+a.formatDate(this.dueDate,"d MMM","en-GB"),this.pAccessibleLabel="This task is due to be completed by "+a.formatDate(this.dueDate,"d MMMM y","en-GB")),0<this.daysDiff+this.highUrgencyCutoff?this.pBadge=S.RED:0<this.daysDiff+this.mediumUrgencyCutoff?this.pBadge=S.ORANGE:this.pBadge=S.GREEN))},E.prototype.getDaysDifference=function(e,t){e=e.getTime(),t=t.getTime(),e=Math.floor((t-e)/1e3);return Math.floor(e/86400)},E.decorators=[{type:g.Component,args:[{selector:"xuilib-due-date",template:'<span *ngIf="dueDate" class="due-date hmcts-badge" [ngClass]="badge"\n [title]="accessibleLabel" [attr.aria-label]="accessibleLabel">\n {{label}}\n</span>',encapsulation:g.ViewEncapsulation.None,styles:[".due-date{white-space:nowrap}.due-date.hmcts-badge--orange{color:#f47738;border-color:#f47738}"]}]}],E.propDecorators={dueDate:[{type:g.Input}],highUrgencyCutoff:[{type:g.Input}],mediumUrgencyCutoff:[{type:g.Input}]},E);function E(){this.highUrgencyCutoff=0,this.mediumUrgencyCutoff=2}var A=(F.prototype.persist=function(e,t){switch(t){case"local":this.persistLocal(e);break;case"session":this.persistSession(e)}this.persistMemory(e),this.updateStreams(e)},F.prototype.get=function(e){return this.filterSettings[e]||(sessionStorage.getItem(e)?JSON.parse(window.sessionStorage.getItem(e)):localStorage.getItem(e)&&this.isSameUser(e)?JSON.parse(window.localStorage.getItem(e)):null)},F.prototype.isSameUser=function(e){e=JSON.parse(window.localStorage.getItem(e));return!!e.idamId&&e.idamId===this.getUserId()},F.prototype.getStream=function(e){return this.streams[e]||(this.streams[e]=new h.BehaviorSubject(this.get(e))),this.streams[e].asObservable()},F.prototype.persistLocal=function(e){e.idamId=this.getUserId(),window.localStorage.setItem(e.id,JSON.stringify(e))},F.prototype.persistSession=function(e){window.sessionStorage.setItem(e.id,JSON.stringify(e))},F.prototype.persistMemory=function(e){this.filterSettings[e.id]=e},F.prototype.updateStreams=function(e){this.streams[e.id]&&this.streams[e.id].next(e)},F.prototype.getUserId=function(){var e,t=window.sessionStorage.getItem("userDetails");return e=t?(t=JSON.parse(t)).id||t.uid:e},F.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],F.ngInjectableDef=g.defineInjectable({factory:function(){return new F},token:F,providedIn:"root"}),F);function F(){this.givenErrors=new h.BehaviorSubject(null),this.isInitialSetting=!1,this.filterSettings={},this.streams={}}function D(e,o){return e.reduce(function(e,t,n){return o[n]?C(e,[t.key]):e},[])}var T=(Object.defineProperty(M.prototype,"config",{get:function(){return this._config},set:function(e){this._config=b({},e,{fields:e.fields.map(function(e){return b({},e,{displayMinSelectedError:!1,displayMaxSelectedError:!1})})}),this._config=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,"settings",{get:function(){return this._settings},set:function(e){e||this.getSettings(),e&&e.fields&&this.mergeDefaultFields(e),this._settings=e},enumerable:!0,configurable:!0}),M.addFormValidators=function(e){var t,n,o=[];return e&&e.minSelected&&o.push((t=e.minSelected,function(e){e=e.value;return e.length&&e.filter(function(e){return e}).length>=t?null:{minLength:!0}})),e&&e.maxSelected&&o.push((n=e.maxSelected,function(e){e=e.value;return e.length&&e.filter(function(e){return e}).length<=n?null:{maxLength:!0}})),o},M.prototype.ngOnInit=function(){var e=this;this.settings||this.getSettings(),this.mergeDefaultFields(this.settings),this.buildForm(this.config,this.settings),this.formSub=this.form.valueChanges.subscribe(function(){return e.submitted=!1})},M.prototype.ngOnDestroy=function(){this.formSub&&this.formSub.unsubscribe()},M.prototype.hidden=function(e,t){if(!e.showCondition)return!1;if("string"==typeof e.showCondition){var n=t.get(e.name),o=k(e.showCondition.split("="),2),i=o[0],o=o[1];if(t.value&&t.value[i]===o)return"find-person"===e.type?(n.get("email").setValidators(d.Validators.required),n.get("email").updateValueAndValidity()):(n.setValidators(d.Validators.required),n.updateValueAndValidity()),!1;"find-person"===e.type?(n.get("email").clearValidators(),n.get("email").updateValueAndValidity()):(n.clearValidators(),n.updateValueAndValidity())}return!0},M.prototype.disabled=function(e,t){if(!e.enableCondition)return null;if("string"==typeof e.enableCondition){var n=t.get(e.name),o=k(e.enableCondition.split("="),2),i=o[0],o=o[1];if(t.value&&t.value[i]===o)return"find-person"===e.type?(n.get("email").setValidators(d.Validators.required),n.get("email").updateValueAndValidity()):(n.setValidators(d.Validators.required),n.updateValueAndValidity()),null;"find-person"===e.type?(n.get("email").clearValidators(),n.get("email").updateValueAndValidity()):(n.clearValidators(),n.updateValueAndValidity())}return"find-location"===e.type||(e.disable||null)},M.prototype.applyFilter=function(e){var t;this.submitted=!0,e.markAsTouched(),e.valid?(this._settings={id:this.config.id,idamId:this.filterService.getUserId(),fields:this.getSelectedValues(e.value,this.config)},this.filterService.givenErrors.next(null),t=b({},this.settings,{reset:!1}),this.filterService.persist(t,this.config.persistence)):this.emitFormErrors(e)},M.prototype.fieldChanged=function(e,t){var n,o;if(e.changeResetFields&&e.changeResetFields.length)try{for(var i=y(e.changeResetFields),s=i.next();!s.done;s=i.next()){var r=s.value;this.resetField(r,t)}}catch(a){n={error:a}}finally{try{s&&!s.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}},M.prototype.inputChanged=function(e){var t;e.radioSelectionChange&&"string"==typeof e.radioSelectionChange&&(e=(t=k(e.enableCondition.split("="),2))[0],t=t[1],this.form.get(e).patchValue(t))},M.prototype.cancelFilter=function(){this.buildForm(this.config,this.settings,!0),this.config&&this.config.cancelSetting&&(this._settings.fields=JSON.parse(JSON.stringify(this.config.cancelSetting.fields)));var e=b({},this.settings,{reset:!0});this.filterService.persist(e,this.config.persistence),this.filterService.givenErrors.next(null),this.submitted=!1},M.prototype.updatePersonControls=function(e,t){var n,o,i=e?Object.keys(e):Object.keys(this.form.get(t.name).value);try{for(var s=y(i),r=s.next();!r.done;r=s.next()){var a,l=r.value;this.form.get(t.name)&&this.form.get(t.name).get(l)&&(a=e&&e[l]?e[l]:null,this.form.get(t.name).get(l).patchValue(a))}}catch(c){n={error:c}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}},M.prototype.toggleSelectAll=function(e,t,n,o){var i,s,r,a,l=e.target.checked,c=t.get(o.name);if(n.selectAll?c.controls.forEach(function(e){l?e.patchValue(!0):e.patchValue(!1)}):(r=c.controls.every(function(e){return e.value}),a=null,e=o.options.find(function(e,t){return!!e.hasOwnProperty("selectAll")&&(a=t,!0)}),n=c.controls.filter(function(e,t){return t!==a}).every(function(e){return e.value}),r||!e||l?e&&!r&&l&&n&&c.controls[a].patchValue(!0):c.controls.forEach(function(e,t){a===t&&e.patchValue(!1)})),o.changeResetFields&&o.changeResetFields.length)try{for(var u=y(o.changeResetFields),d=u.next();!d.done;d=u.next()){var p=d.value;this.resetField(p,t)}}catch(g){i={error:g}}finally{try{d&&!d.done&&(s=u["return"])&&s.call(u)}finally{if(i)throw i.error}}},M.prototype.resetField=function(t,e){var n,o,i=e.get(t),s=this.config.cancelSetting.fields.find(function(e){return e.name===t});if(i instanceof d.FormArray)for(var r=0;r<i.length;r++)i.removeAt(r);else if(i instanceof d.FormGroup){e=Object.keys(i.value);try{for(var a=y(e),l=a.next();!l.done;l=a.next()){var c=l.value;this.resetField(c,i)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}}else i instanceof d.FormControl&&(s=s&&s.value&&s.value.length?s.value[0]:null,i.setValue(s))},M.prototype.mergeDefaultFields=function(e){e?e.fields=(this.filterService.get(this.config.id)?this.filterService.get(this.config.id):e).fields:this.config&&this.config.cancelSetting&&(this._settings={id:this.config.id,fields:JSON.parse(JSON.stringify(this.config.cancelSetting.fields))})},M.prototype.getSettings=function(){this._settings=this.filterService.get(this.config.id)},M.prototype.buildForm=function(s,r,a){var e,t,n=this.form?this.form.get("findPersonControl"):null;this.form=this.fb.group({}),n&&this.form.addControl("findPersonControl",n);var l=this;try{for(var o=y(s.fields),i=o.next();!i.done;i=o.next())!function(t){var e,n,o,i;"checkbox"===t.type||"checkbox-large"===t.type?(e=l.buildCheckBoxFormArray(t,r),l.form.addControl(t.name,e)):"find-location"===t.type?(e=l.buildFindLocationFormArray(t,r),l.form.addControl(t.name,e)):(i=[],t.minSelected&&0<t.minSelected&&i.push(d.Validators.required),n=null,a&&s.cancelSetting?n=(e=s.cancelSetting.fields.find(function(e){return e.name===t.name}))&&e.value?e.value[0]:"":r&&r.fields&&(n=(o=r.fields.find(function(e){return e.name===t.name}))&&o?o.value[0]:""),"find-person"===t.type?(o=new d.FormGroup({domain:new d.FormControl(n&&n.hasOwnProperty("domain")?n.domain:""),email:new d.FormControl(n&&n.hasOwnProperty("email")?n.email:"",i),id:new d.FormControl(n&&n.hasOwnProperty("id")?n.id:""),name:new d.FormControl(n&&n.hasOwnProperty("name")?n.name:""),knownAs:new d.FormControl(n&&n.hasOwnProperty("knownAs")?n.knownAs:"")}),l.form.addControl(t.name,o)):(i=new d.FormControl(n,i),l.form.addControl(t.name,i)),t.findPersonField&&l.fieldChanged(t,l.form))}(i.value)}catch(c){e={error:c}}finally{try{i&&!i.done&&(t=o["return"])&&t.call(o)}finally{if(e)throw e.error}}},M.prototype.buildCheckBoxFormArray=function(t,e){var n,o,i,s=M.addFormValidators(t),r=this.fb.array([],s);e&&e.fields&&(i=e.fields.find(function(e){return e.name===t.name}));try{for(var a=y(t.options),l=a.next();!l.done;l=a.next())!function(t){var e=!1;i&&Array.isArray(i.value)&&(e=!!i.value.find(function(e){return e===t.key})),r.push(new d.FormControl(e))}(l.value)}catch(c){n={error:c}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return r},M.prototype.buildFindLocationFormArray=function(t,e){var n,o,i,s=M.addFormValidators(t),r=this.fb.array([],s);if(e&&e.fields&&(i=e.fields.find(function(e){return e.name===t.name}))&&i.value&&0<i.value.length)try{for(var a=y(i.value),l=a.next();!l.done;l=a.next()){var c=l.value;r.push(new d.FormControl(c))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return r},M.prototype.getSelectedValues=function(o,i){return Object.keys(o).map(function(t){var e=o[t];if(Array.isArray(e)){var n=i.fields.find(function(e){return e.name===t});return"find-location"===n.type?{value:e,name:t}:{value:D(n.options,e),name:t}}return{value:[e],name:t}})},M.prototype.emitFormErrors=function(e){var t,n,o=[];try{for(var i=y(this.config.fields),s=i.next();!s.done;s=i.next()){var r=s.value,a=e.get(r.name);a&&a.errors&&a.errors.minLength&&o.push({name:r.name,error:r.minSelectedError}),a&&a.errors&&a.errors.maxLength&&o.push({name:r.name,error:r.minSelectedError})}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}o.length&&this.filterService.givenErrors.next(o)},M.decorators=[{type:g.Component,args:[{selector:"xuilib-generic-filter",template:'<form [formGroup]="form" (ngSubmit)="applyFilter(form)">\n <div class="contain-classes" *ngFor="let field of config.fields">\n <hr *ngIf="field.lineBreakBefore" class="govuk-section-break govuk-section-break--visible elevated-break">\n <div class="govuk-form-group xui-generic-filter"\n [hidden]="hidden(field, form)"\n [id]="field.name"\n [ngClass]="{\'form-group-error\': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}">\n <h3 *ngIf="field.title" class="govuk-heading-s">{{field.title}}</h3>\n <p class="govuk-body" *ngIf="field.subTitle">{{field.subTitle}}</p>\n <span [id]="field.name + \'-error\'" class="govuk-error-message" *ngIf="field.displayMinSelectedError && submitted && form.get(field.name).errors?.minLength">\n <span class="govuk-visually-hidden">Error:</span> {{field.minSelectedError}}\n </span>\n <span [id]="field.name + \'-error\'" class="govuk-error-message" *ngIf="field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength">\n <span class="govuk-visually-hidden">Error:</span> {{field.maxSelectedError}}\n </span>\n <div class="govuk-body" [ngSwitch]="field.type">\n <ng-container *ngSwitchCase="\'select\'">\n <select class="govuk-select" (change)="fieldChanged(field, form)" [attr.disabled]="disabled(field, form)" [name]="\'select_\' + field.name" [id]="\'select_\' + field.name" [formControlName]="field.name">\n <option disabled selected hidden value="">{{field.disabledText}}</option>\n <option class="govuk-radios__item" *ngFor="let item of field.options" [value]="item.key">{{item.label}}</option>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase="\'checkbox\'">\n <div class="govuk-checkboxes govuk-checkboxes--small" [formGroupName]="field.name" [attr.field]="field.name" [id]="\'checkbox_\' + field.name">\n <div *ngFor="let item of field.options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" class="govuk-checkboxes__input"\n [attr.disabled]="disabled(field, form)"\n [formControlName]="i"\n (change)="toggleSelectAll($event, form, item, field)"\n [value]="item.key" [id]="\'checkbox_\' + item.key"\n [name]="\'checkbox_\' + item.key"\n />\n <label\n [for]="\'checkbox_\' + item.key"\n class="govuk-label govuk-checkboxes__label"\n [ngClass]="{\'govuk-!-font-weight-bold\': item.selectAll}"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'checkbox-large\'">\n <div class="govuk-checkboxes" [formGroupName]="field.name" [attr.field]="field.name" [id]="\'checkbox_\' + field.name">\n <div *ngFor="let item of field.options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" class="govuk-checkboxes__input"\n [attr.disabled]="disabled(field, form)"\n [formControlName]="i"\n (change)="toggleSelectAll($event, form, item, field)"\n [value]="item.key" [id]="\'checkbox_\' + item.key"\n [name]="\'checkbox_\' + item.key"\n />\n <label\n [for]="\'checkbox_\' + item.key"\n class="govuk-label govuk-checkboxes__label"\n [ngClass]="{\'govuk-!-font-weight-bold\': item.selectAll}"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'radio\'">\n <div class="govuk-radios">\n <div *ngFor="let item of field.options" class="govuk-radios__item">\n <input type="radio"\n [formControlName]="field.name"\n [id]="\'radio_\' + item.key"\n [attr.disabled]="disabled(field, form)"\n [checked]="item.key === form.get(field.name).value"\n class="govuk-radios__input"\n [value]="item.key"\n (change)="fieldChanged(field, form)"\n />\n <label [for]="\'radio_\' + item.key" class="govuk-label govuk-radios__label">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-person\'">\n <xuilib-find-person subTitle="" (personSelected)="updatePersonControls($event, field)"\n (personFieldChanged)="inputChanged(field)"\n [submitted]="submitted"\n [disabled]="disabled(field, form)"\n [domain]="form.get(field.domainField)?.value"\n [findPersonGroup]="form"\n [selectedPerson]="form.get(field.name)?.value?.email"\n [userIncluded]="false"\n [placeholderContent]="field.placeholderContent ? field.placeholderContent : \'\'"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-location\'">\n <xuilib-find-location (locationFieldChanged)="inputChanged(field)"\n [form]="form"\n [fields]="config.fields"\n [locationTitle]="field.locationTitle"\n [enableAddLocationButton]="field.enableAddButton"\n [disabled]="disabled(field, form)"\n [disableInputField]="field.disable"\n [selectedLocations]="form.get(field.name)?.value"\n [submitted]="submitted"\n [field]="field"\n [services]="form.get(field.findLocationField)?.value"\n ></xuilib-find-location>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-service\'">\n <xuilib-find-service (serviceFieldChanged)="inputChanged(field)"\n [form]="form"\n [fields]="config.fields"\n [title]="field.title"\n [enableAddServiceButton]="field.enableAddButton"\n [disabled]="disabled(field, form)"\n [disableInputField]="field.disable"\n [field]="field"\n [selectedServices]="form.get(field.name)?.value" \n ></xuilib-find-service>\n </ng-container>\n </div>\n </div>\n </div>\n <hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible"/>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-full">\n <button\n class="govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0"\n type="submit"\n id="applyFilter"\n [disabled]="config.enableDisabledButton && form.invalid"\n >{{config.applyButtonText || \'Apply\'}}</button>\n <button *ngIf="config.showCancelFilterButton"\n class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0"\n type="button"\n id="cancelFilter"\n (click)="cancelFilter()">{{ config.cancelButtonText || \'Cancel\'}}</button>\n </div>\n </div>\n</form>\n',changeDetection:g.ChangeDetectionStrategy.OnPush,encapsulation:g.ViewEncapsulation.None,styles:[".contain-classes .elevated-break{position:relative;top:-10px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}"]}]}],M.ctorParameters=function(){return[{type:A},{type:d.FormBuilder}]},M.propDecorators={config:[{type:g.Input}],settings:[{type:g.Input}]},M);function M(e,t){this.filterService=e,this.fb=t,this.submitted=!1}var P=(O.prototype.onClose=function(){this.close.emit()},O.decorators=[{type:g.Component,args:[{selector:"xuilib-session-dialog",template:'<div class="gem-c-modal-dialogue" data-module="modal-dialogue" id="modal-default" style="display: block;">\n <div class="gem-c-modal-dialogue__overlay"></div>\n <dialog class="gem-c-modal-dialogue__box" aria-modal="true" role="dialog" tabindex="0" [ngStyle]="{\'margin-top\': positionTop}">\n <div class="gem-c-modal-dialogue__header">\n <svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" height="33" width="33">\n <style type="text/css">\n .st0{fill:#FFFFFF;}\n </style>\n <g id="_4_-_granular_components_warning_icon" transform="translate(0.5 0.5)">\n <g id="Warning_icon" transform="translate(0)">\n <path id="Exclusion_1" class="st0" d="M18.5,37.5c-5.04,0.01-9.88-1.99-13.44-5.57C1.49,28.38-0.51,23.54-0.5,18.5\n c-0.01-5.04,1.99-9.88,5.56-13.43C8.62,1.49,13.46-0.51,18.5-0.5c5.04-0.01,9.88,1.99,13.44,5.56c3.57,3.56,5.58,8.39,5.56,13.44\n c0.01,5.04-1.99,9.88-5.56,13.44C28.38,35.51,23.54,37.51,18.5,37.5z M18.52,24.29c-0.4,0-0.8,0.08-1.17,0.23\n c-0.36,0.15-0.69,0.37-0.97,0.64c-0.28,0.27-0.5,0.59-0.65,0.95c-0.16,0.36-0.24,0.76-0.23,1.15c0,0.4,0.08,0.8,0.23,1.17\n c0.15,0.36,0.37,0.68,0.65,0.96c0.28,0.27,0.61,0.49,0.97,0.64c0.37,0.16,0.77,0.24,1.17,0.24c0.4,0,0.79-0.08,1.15-0.24\n c0.35-0.15,0.67-0.37,0.95-0.64c0.27-0.27,0.49-0.6,0.64-0.96c0.16-0.37,0.24-0.77,0.23-1.17c0-0.4-0.08-0.79-0.23-1.15\n c-0.15-0.35-0.37-0.67-0.64-0.95c-0.27-0.27-0.6-0.49-0.95-0.64C19.31,24.37,18.92,24.29,18.52,24.29L18.52,24.29z M16.11,7.5\n l0.42,14.87h3.91L20.86,7.5H16.11z"/>\n </g>\n </g>\n </svg>\n <div class="gem-c-modal-dialogue__title">We are about to sign you out</div>\n </div>\n <div class="gem-c-modal-dialogue__content">\n <ng-content></ng-content>\n </div>\n </dialog>\n</div>\n',styles:['.gem-c-modal-dialogue{display:none;position:fixed;z-index:1000;top:0;left:0;width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;outline:0}.gem-c-modal-dialogue__box{display:block;position:fixed;background:#fff;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;padding:0;overflow-y:auto;border:0;font-family:"GDS Transport",Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:1rem;line-height:1.25;color:#0b0c0c}.gem-c-modal-dialogue__box:focus{outline:#fd0 solid 3px}@media (min-width:40.0625em){.gem-c-modal-dialogue__box{font-size:1.1875rem;line-height:1.3157894737;position:relative;top:inherit;right:inherit;bottom:inherit;left:inherit;width:auto;max-width:640px;height:auto;margin:30px auto;border:2px solid #0b0c0c}}@media print{.gem-c-modal-dialogue__box{font-family:sans-serif;font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em) and (max-width:64em){.gem-c-modal-dialogue__box--wide{margin:30px}}.gem-c-modal-dialogue__overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:.8;background:#0b0c0c;pointer-events:none;touch-action:none}@media screen{.gem-o-template--modal{overflow-y:inherit}}.gem-o-template__body--modal{overflow:hidden}.gem-o-template__body--blur .govuk-footer,.gem-o-template__body--blur .govuk-header,.gem-o-template__body--blur .govuk-main-wrapper,.gem-o-template__body--blur .govuk-phase-banner,.gem-o-template__body--blur .govuk-skip-link,.gem-o-template__body--blur .govuk-width-container .govuk-back-link{filter:blur(2px)}.govuk-warning-text__icon{margin:0 0 0 12px}.gem-c-modal-dialogue__header{padding:9px 15px 10px;color:#fff;background:#d4351d;display:flex}.gem-c-modal-dialogue__title{margin:5px 0 4px 12px}.gem-c-modal-dialogue__logotype-crown{fill:currentColor;vertical-align:middle}.gem-c-modal-dialogue__logotype-crown-fallback-image{width:30px;height:26px;border:0;vertical-align:middle}.gem-c-modal-dialogue__content{padding:15px;background:#fff}.gem-c-modal-dialogue__close-button{position:absolute;top:0;right:0;width:44px;height:44px;border:0;color:#fff;background:0 0;cursor:pointer;font-family:"GDS Transport",Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:1.5rem;line-height:1.3}@media (min-width:40.0625em){.gem-c-modal-dialogue__box--wide{max-width:960px}.gem-c-modal-dialogue__close-button{font-size:2.25rem;line-height:1.3}}@media print{.gem-c-modal-dialogue__close-button{font-family:sans-serif;font-size:24pt;line-height:1.3}}@media (max-width:40.0525em){.gem-c-modal-dialogue__close-button{font-size:36px;line-height:1.3}}.gem-c-modal-dialogue__close-button:focus,.gem-c-modal-dialogue__close-button:hover{color:#0b0c0c;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none;outline:0;background:#fd0}']}]}],O.ctorParameters=function(){return[]},O.propDecorators={positionTop:[{type:g.Input}],close:[{type:g.Output}]},O);function O(){this.close=new g.EventEmitter}var N=(Object.defineProperty(U.prototype,"errorMessages",{set:function(e){this.isInvalid=e||{}},enumerable:!0,configurable:!0}),U.prototype.onSubmit=function(){this.submitForm.emit()},U.decorators=[{type:g.Component,args:[{selector:"xuilib-invite-user-form",template:'\n<form [formGroup]="inviteUserForm" (ngSubmit)="onSubmit()" >\n\n <xuilib-gov-uk-input\n [config]="{label: \'First name\', hint: \'Include all middle names.\', name: \'firstName\', id: \'firstName\', type: \'text\', classes: \'testClass\'}"\n [errorMessage]="isInvalid.firstName"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-gov-uk-input\n [config]="{label: \'Last name\', name: \'lastName\', id: \'lastName\', type: \'text\'}"\n [errorMessage]="isInvalid.lastName"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-gov-uk-input\n [config]="{label: \'Email address\', name: \'email\', id: \'email\', type: \'email\'}"\n [errorMessage]="isInvalid.email"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-invite-permission-form [inviteUserForm]="inviteUserForm" [errorMessages]="isInvalid.roles">\n </xuilib-invite-permission-form>\n\n <button type="submit" class="govuk-button">\n Send invitation\n </button>\n</form>\n'}]}],U.propDecorators={submitForm:[{type:g.Output}],inviteUserForm:[{type:g.Input}],errorMessages:[{type:g.Input}]},U);function U(){this.submitForm=new g.EventEmitter}var j=(B.decorators=[{type:g.Component,args:[{selector:"xuilib-invite-permission-form",template:" \x3c!--permissions --\x3e\n <ng-container [formGroup]=\"inviteUserForm\">\n <xuilib-gov-uk-form-group-wrapper\n [config]=\"{hint: 'Choose what the user will be able to do. You can change this later.', legend: 'Permissions', key: 'roles'}\"\n [formGroupName]=\"'roles'\"\n [error]=\"errorMessages\">\n\n <div class=\"govuk-checkboxes\">\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiCaseManager\"\n [config]=\"{value: 'pui-case-manager', label: 'Manage Cases', name: 'roles', hint: 'View, create and progress cases.', focusOn: 'roles'}\">\n </xuilib-gov-checkbox>\n\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiUserManager\"\n [config]=\"{value: 'pui-user-manager', label: 'Manage Users', name: 'roles',\n hint: 'Invite users.'}\">\n </xuilib-gov-checkbox>\n\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiOrganisationManager\"\n [config]=\"{value: 'pui-organisation-manager', label: 'Manage Organisation', name: 'roles',\n hint: 'View organisation name and addresses.'}\">\n </xuilib-gov-checkbox>\n\n \x3c!-- <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiFinanceManager\"\n [config]=\"{value: 'pui-finance-manager', label: 'Manage Payments', name: 'roles',\n hint: 'View account balances, available credit and transactions.'}\">\n </xuilib-gov-checkbox> --\x3e\n </div>\n\n </xuilib-gov-uk-form-group-wrapper>\n</ng-container>"}]}],B.propDecorators={inviteUserForm:[{type:g.Input}],isPuiCaseManager:[{type:g.Input}],isPuiUserManager:[{type:g.Input}],isPuiOrganisationManager:[{type:g.Input}],isPuiFinanceManager:[{type:g.Input}],errorMessages:[{type:g.Input}]},B);function B(){this.isPuiCaseManager=!1,this.isPuiUserManager=!1,this.isPuiOrganisationManager=!1,this.isPuiFinanceManager=!1}var R=(V.decorators=[{type:g.Component,args:[{selector:"xuilib-loading-spinner",template:'<div class="spinner-container">\n <div class="spinner-inner-container">\n <p>{{loadingText}}</p>\n <div class="spinner" style="margin: auto;"></div>\n </div>\n</div>\n',encapsulation:g.ViewEncapsulation.None,styles:[".spinner-container{position:fixed;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:99}.spinner-container .spinner-inner-container p{text-align:center}.spinner-container .spinner-inner-container .spinner{border:10px solid #ddd;border-top:10px solid #000;border-radius:50%;width:40px;height:40px;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]}]}],V.propDecorators={loadingText:[{type:g.Input}]},V);function V(){this.loadingText="Loading"}var G=(Object.defineProperty(z.prototype,"state",{get:function(){return this.subject.asObservable().pipe(m.distinctUntilChanged())},enumerable:!0,configurable:!0}),z.prototype.setCases=function(e){var t=this;this.caseState=[],e.forEach(function(e){t.caseState.push({caseId:e.caseId,caseTitle:e.caseTitle,caseTypeId:e.caseTypeId,roles:e.roles,sharedWith:e.sharedWith,pendingShares:e.pendingShares,pendingUnshares:e.pendingUnshares})}),this.subject.next(this.caseState)},z.prototype.getCases=function(){return this.caseState},z.prototype.requestShare=function(t){var e,n,o=this.caseState.slice(),i=[];try{for(var s=y(o),r=s.next();!r.done;r=s.next()){var a=r.value;a.pendingShares||(a.pendingShares=[]);var l=a.pendingShares.slice();a.pendingUnshares||(a.pendingUnshares=[]);var c=a.pendingUnshares.slice();if(this.userHasAccess(a,t)){for(var u=0,d=c.length;u<d;u++)if(c[u].email===t.email){c.splice(u,1);break}}else l.some(function(e){return e.email===t.email})||l.push(t);var p=b({},a,{pendingUnshares:c,pendingShares:l});i.push(p)}}catch(g){e={error:g}}finally{try{r&&!r.done&&(n=s["return"])&&n.call(s)}finally{if(e)throw e.error}}return this.subject.next(i),i},z.prototype.requestUnshare=function(t,e){var n,o,i=[];try{for(var s=y(this.caseState),r=s.next();!r.done;r=s.next()){var a,l,c,u,d=r.value;e===undefined||d.caseId===e?(d.pendingUnshares||(d.pendingUnshares=[]),a=d.pendingUnshares.slice(),l=void 0,c=-1,d.pendingShares&&-1<(c=d.pendingShares.findIndex(function(e){return e.idamId===t.idamId}))&&(l=d.pendingShares.slice()).splice(c,1),-1===c&&d.sharedWith&&-1<d.sharedWith.findIndex(function(e){return e.idamId===t.idamId})&&(a.some(function(e){return e.email===t.email})||a.push(t)),u=b({},d,{pendingUnshares:a},l&&{pendingShares:l}),i.push(u)):i.push(d)}}catch(p){n={error:p}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}return this.subject.next(i),i},z.prototype.requestCancel=function(e,t){var n,o,i=[];try{for(var s=y(this.caseState),r=s.next();!r.done;r=s.next()){var a=r.value;if(a.caseId===e){a.pendingUnshares||(a.pendingUnshares=[]);for(var l=a.pendingUnshares.slice(),c=0;c<l.length;c++)if(l[c].email===t.email){l.splice(c,1);break}a.pendingShares||(a.pendingShares=[]);for(var u=a.pendingShares.slice(),d=0;d<u.length;d++)if(u[d].email===t.email){u.splice(d,1);break}var p=b({},a,{pendingUnshares:l,pendingShares:u});i.push(p)}else i.push(a)}}catch(g){n={error:g}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}this.subject.next(i)},z.prototype.removeCase=function(e){if(1<this.caseState.length)for(var t=0,n=this.caseState.length;t<n;t++)if(this.caseState[t].caseId===e)return this.caseState.splice(t,1),void this.subject.next(this.caseState)},z.prototype.userHasAccess=function(e,t){if(!e.sharedWith)return!1;for(var n=0,o=e.sharedWith.length;n<o;n++)if(e.sharedWith[n].email===t.email)return!0;return!1},z.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[]},z.ngInjectableDef=g.defineInjectable({factory:function(){return new z},token:z,providedIn:"root"}),z);function z(){this.caseState=[],this.subject=new h.BehaviorSubject(this.caseState)}var W=(H.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){return t.shareCases=e})},H.prototype.trackByUserId=function(e){return e.idamId},H.prototype.showUserAccessBlock=function(){return!!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)||this.sharedCase.pendingUnshares&&0<this.sharedCase.pendingUnshares.length},H.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case-confirm",template:'<div id="user-access-block-{{ sharedCase.caseId }}" *ngIf="showUserAccessBlock()">\n <h2 class="govuk-heading-m case-share-confirm__title">{{ sharedCase.caseTitle }}</h2>\n <div class="case-share-confirm__caption-area">\n <div class="govuk-caption-m case-share-confirm__caption">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]="changeLink" class="case-share-confirm__change-link govuk-link govuk-!-font-size-19">Change</a>\n </div>\n <table class="govuk-table">\n <thead class="govuk-table__head">\n <tr class="govuk-table__row">\n <th class="govuk-table__header govuk-table-column-header" scope="col">Name</th>\n <th class="govuk-table__header govuk-table-column-header" scope="col">Email address</th>\n <th class="govuk-table__header govuk-table-column-actions" scope="col">Actions</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let user of sharedCase.pendingShares; trackBy: trackByUserId">\n <td class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <span class="hmcts-badge">To be added</span>\n </td>\n </tr>\n <tr class="govuk-table__row" *ngFor="let user of sharedCase.pendingUnshares; trackBy: trackByUserId">\n <td class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <span class="hmcts-badge hmcts-badge--red">To be removed</span>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n',styles:[".case-share-confirm__title{margin-bottom:0}.case-share-confirm__caption-area{border-bottom:1px solid #b1b4b6;padding-bottom:10px;display:inline-block;width:100%;clear:both}.case-share-confirm__caption{float:left}.case-share-confirm__change-link{float:right}.govuk-table-column-header{width:45%}.govuk-table-column-actions{width:10%}"]}]}],H.ctorParameters=function(){return[{type:G}]},H.propDecorators={sharedCase:[{type:g.Input}],changeLink:[{type:g.Input}]},H);function H(e){this.stateService=e,this.changeLink=""}var $=(q.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){t.shareCases=e,t.caseCount=t.shareCases.length})},q.prototype.onUnselect=function(e){this.unselect.emit(e),this.caseCount=this.shareCases.length},q.prototype.onSynchronizeStore=function(e){this.synchronizeStore.emit(e)},q.prototype.trackByCaseId=function(e){return e.caseId},q.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case-list",template:'<ng-container *ngIf="!toConfirm">\n <xuilib-selected-case\n *ngFor="let sharedCase of (shareCases$ | async); trackBy: trackByCaseId"\n [sharedCase]="sharedCase"\n [caseCount]="caseCount"\n [removeUserFromCaseToggleOn]="removeUserFromCaseToggleOn"\n (unselect)="onUnselect($event)"\n (synchronizeStore)="onSynchronizeStore($event)"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf="toConfirm">\n <xuilib-selected-case-confirm\n *ngFor="let sharedCase of (shareCases$ | async); trackBy: trackByCaseId"\n [sharedCase]="sharedCase"\n [changeLink]="changeLink">\n </xuilib-selected-case-confirm>\n</ng-container>\n',styles:[""]}]}],q.ctorParameters=function(){return[{type:G}]},q.propDecorators={shareCases$:[{type:g.Input}],removeUserFromCaseToggleOn:[{type:g.Input}],toConfirm:[{type:g.Input}],changeLink:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}]},q);function q(e){this.stateService=e,this.shareCases=[],this.toConfirm=!1,this.changeLink="",this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter}var J=(K.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){return t.shareCases=e})},K.prototype.ngOnChanges=function(e){var t;e.sharedCase&&(t=this.sharedCase.sharedWith||[],e=this.sharedCase.pendingShares||[],this.combinedSortedShares=this.combineAndSortShares(t,e))},K.prototype.onDeselect=function(e){this.unselect.emit(e)},K.prototype.trackByUserId=function(e){return e.idamId},K.prototype.canRemove=function(a,l){var c=this;return this.shareCases$.pipe(m.map(function(e){var t,n;if(c.removeUserFromCaseToggleOn)try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a){if(s.pendingUnshares&&s.pendingUnshares.some(function(e){return e.idamId===l.idamId}))return!1;if(s.sharedWith&&s.sharedWith.some(function(e){return e.idamId===l.idamId}))return!0}}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}return!1}))},K.prototype.canCancel=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return!(!s.pendingShares||!s.pendingShares.some(function(e){return e.idamId===l.idamId}))||!(!s.pendingUnshares||!s.pendingUnshares.some(function(e){return e.idamId===l.idamId}))}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.isToBeRemoved=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return s.pendingUnshares&&s.pendingUnshares.some(function(e){return e.idamId===l.idamId})}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.isToBeAdded=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return s.pendingShares&&s.pendingShares.some(function(e){return e.idamId===l.idamId})}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.onRemove=function(e,t){this.stateService.requestUnshare(e,t.caseId),this.synchronizeStore.emit(this.shareCases)},K.prototype.onCancel=function(e,t){this.stateService.requestCancel(t.caseId,e),this.synchronizeStore.emit(this.shareCases)},K.prototype.showNoUsersAccessInfo=function(){return!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)&&(!(!this.sharedCase.sharedWith||0!==this.sharedCase.sharedWith.length)||!!(this.sharedCase.sharedWith&&this.sharedCase.pendingUnshares&&0<this.sharedCase.pendingUnshares.length&&this.sharedCase.sharedWith.length===this.sharedCase.pendingUnshares.length))},K.prototype.showUserHasAccessInfo=function(){return!this.showNoUsersAccessInfo()},K.prototype.showUserAccessTable=function(){return!!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)||!!(this.sharedCase.sharedWith&&0<this.sharedCase.sharedWith.length)},K.prototype.combineAndSortShares=function(e,t){return C(e,t).sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:t.firstName.toLowerCase()>e.firstName.toLowerCase()?-1:0})},K.prototype.userIdSetter=function(e,t){return e?"pendingShares-"+t:""+t},K.prototype.buildElementId=function(e){return e+"-"+this.sharedCase.caseId},K.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case",template:'<div id="{{buildElementId(\'govuk-accordion__section\')}}" class="govuk-accordion__section">\n <div class="govuk-grid-row govuk-case-header">\n <div class="govuk-grid-column-three-quarters">\n <h3 id="{{buildElementId(\'case-title\')}}" class="govuk-case-title">{{ sharedCase.caseTitle }}</h3>\n <h1 id="{{buildElementId(\'case-id\')}}" class="govuk-case-sub-title">{{ sharedCase.caseId }}</h1>\n </div>\n <div class="govuk-grid-column-twenty-percent">\n <button *ngIf="caseCount > 1"\n id="{{buildElementId(\'btn-deselect-case\')}}" \n class="govuk-button hmcts-button--secondary" \n (click)="onDeselect(sharedCase)" \n title="Deselect case">Deselect case\n </button>\n </div>\n <div class="govuk-accordion__section-header govuk-grid-column-five-percent">\n <div class="govuk-accordion__section-heading">\n <button type="button" id="{{buildElementId(\'accordion-with-summary-sections-heading\')}}"\n aria-controls="accordion-with-summary-sections-content-1" class="govuk-accordion__section-button"\n aria-describedby="accordion-with-summary-sections-summary-1" aria-expanded="false" title="Expand or Collapse">\n <span class="govuk-accordion__icon" aria-hidden="true"></span></button>\n </div>\n </div>\n </div>\n <div id="{{buildElementId(\'accordion-with-summary-sections-content\')}}" class="govuk-accordion__section-content"\n aria-labelledby="buildElementId(\'accordion-with-summary-sections-heading\')" >\n <div class="govuk-grid-row" *ngIf="showNoUsersAccessInfo()">\n <span id="{{buildElementId(\'access-info-no-user\')}}" class="govuk-div-align-left">No users from your organisation currently have access to this case.</span>\n </div>\n <div class="govuk-grid-row" *ngIf="showUserHasAccessInfo()">\n <span id="{{buildElementId(\'access-info-has-users\')}}" class="govuk-div-align-left">Users from your organisation with access to this case.</span>\n </div>\n <table class="govuk-table" *ngIf="showUserAccessTable()">\n <thead class="govuk-table__head">\n <tr class="govuk-table__row">\n <th id="{{buildElementId(\'name-heading\')}}" class="govuk-table__header govuk-table-column-header" scope="col">Name</th>\n <th id="{{buildElementId(\'email-heading\')}}" class="govuk-table__header govuk-table-column-header" scope="col">Email address</th>\n <th id="{{buildElementId(\'action-heading\')}}" class="govuk-table__header govuk-table-column-actions" scope="col">Actions</th>\n <th id="{{buildElementId(\'label-heading\')}}" class="govuk-table__header govuk-table-column-label" scope="col">Status</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let user of combinedSortedShares; index as idx; trackBy: trackByUserId">\n <td id="user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}" class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td id="user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}" class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <a *ngIf="canRemove(sharedCase.caseId, user) | async" (click)="onRemove(user, sharedCase)" href="javascript:void(0);">Remove <span class="govuk-visually-hidden">{{ user.firstName + \' \' + user.lastName }} from case</span></a>\n <a *ngIf="canCancel(sharedCase.caseId, user) | async" (click)="onCancel(user, sharedCase)" href="javascript:void(0);">Cancel <span class="govuk-visually-hidden">adding {{ user.firstName + \' \' + user.lastName }} to case</span></a>\n </td>\n <td class="govuk-table__cell">\n <span *ngIf="isToBeRemoved(sharedCase.caseId, user) | async" class="hmcts-badge hmcts-badge--red">To be removed</span>\n <span *ngIf="isToBeAdded(sharedCase.caseId, user) | async" class="hmcts-badge">To be added</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n',styles:[".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}"]}]}],K.ctorParameters=function(){return[{type:G}]},K.propDecorators={sharedCase:[{type:g.Input}],selectedUser:[{type:g.Input}],opened:[{type:g.Input}],removeUserFromCaseToggleOn:[{type:g.Input}],caseCount:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}]},K);function K(e){this.stateService=e,this.opened=!1,this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter}var Y=(Q.prototype.onHideMessageEvent=function(e){this.hideMessage.emit(e)},Q.decorators=[{type:g.Component,args:[{selector:"xuilib-service-message",template:'<div class="hmcts-banner hmcts-banner--warning">\n\n <svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" />\n </svg>\n\n <div class="hmcts-banner__message">\n <span class="hmcts-banner__assistive">Warning</span>\n <h2 class="govuk-heading-s" [innerHTML]="message"></h2>\n <a [routerLink]="" class="govuk-link--no-visited-state" (click)="onHideMessageEvent(key)">Hide message</a>\n </div>\n\n</div>'}]}],Q.ctorParameters=function(){return[]},Q.propDecorators={message:[{type:g.Input}],key:[{type:g.Input}],hideMessage:[{type:g.Output}]},Q);function Q(){this.hideMessage=new g.EventEmitter}var X=(Z.prototype.initialize=function(e,t){throw new Error("Not implemented")},Z.prototype.isEnabled=function(e){throw new Error("Not implemented")},Z.prototype.getValue=function(e,t){throw new Error("Not implemented")},Z.prototype.getValueOnce=function(e,t){throw new Error("Not implemented")},Z.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Z.ngInjectableDef=g.defineInjectable({factory:function(){return new Z},token:Z,providedIn:"root"}),Z);function Z(){}var ee=(te.prototype.ngOnInit=function(){this.getServiceMessages()},te.prototype.getServiceMessages=function(){var t=this;this.featureToggleService.getValue(this.featureToggleKey,null).subscribe(function(e){e&&t.createFilteredMessages(e)})},te.prototype.createFilteredMessages=function(n){var o=this;this.hiddenBanners=JSON.parse(window.sessionStorage.getItem(this.serviceMessageCookie))||[],Object.keys(n).forEach(function(e){var t=new RegExp(e);o.userRoles.some(function(e){return t.test(e)})&&-1===o.hiddenBanners.indexOf(e)&&o.filteredMessages.set(e,n[e])})},te.prototype.hideMessage=function(e){this.filteredMessages["delete"](e),this.hiddenBanners.push(e),window.sessionStorage.setItem(this.serviceMessageCookie,JSON.stringify(this.hiddenBanners))},te.decorators=[{type:g.Component,args:[{selector:"xuilib-service-messages",template:'<div *ngIf="filteredMessages?.size > 0" class="govuk-width-container govuk-!-margin-top-6">\n <xuilib-service-message *ngFor="let message of filteredMessages | keyvalue" [key]="message.key"\n [message]="message.value" (hideMessage)="hideMessage($event)"></xuilib-service-message>\n</div>'}]}],te.ctorParameters=function(){return[{type:X}]},te.propDecorators={userRoles:[{type:g.Input}],featureToggleKey:[{type:g.Input}],serviceMessageCookie:[{type:g.Input}]},te);function te(e){this.featureToggleService=e,this.filteredMessages=new Map}var ne=(oe.prototype.ngOnInit=function(){var t=this;this.shareCases$.subscribe(function(e){t.shareCases=e,t.stateService.setCases(e)}),this.shareCases$=this.stateService.state},oe.decorators=[{type:g.Component,args:[{selector:"xuilib-share-case-confirm",template:'<div id="casesToConfirm">\n <h3 class="govuk-heading-l">Cases</h3>\n <div *ngIf="shareCases && shareCases.length > 0" id="summarySections">\n <xuilib-selected-case-list\n [shareCases$]="shareCases$"\n [toConfirm]="true"\n [changeLink]="changeLink">\n </xuilib-selected-case-list>\n </div>\n\n <div id="noCaseDisplay" *ngIf="shareCases && shareCases.length === 0" class="govuk-hint">\n No cases to display.\n </div>\n\n</div>\n\n<div id="share-case-nav" *ngIf="shareCases && shareCases.length > 0">\n <button class="govuk-button" title="Confirm" [routerLink]="completeLink">Confirm</button>\n</div>\n',styles:[""]}]}],oe.ctorParameters=function(){return[{type:G}]},oe.propDecorators={shareCases$:[{type:g.Input}],changeLink:[{type:g.Input}],completeLink:[{type:g.Input}]},oe);function oe(e){this.stateService=e,this.shareCases=[],this.changeLink="",this.completeLink=""}var ie={OneCaseMustBeSelected:"At least one case must be selected",NoChangesRequested:"You have not requested any changes to case sharing",OnePersonMustBeAssigned:"At least one person must be assigned to each case"},se=(re.prototype.ngOnInit=function(){var t=this;this.filteredUsers=this.control.valueChanges.pipe(m.map(function(e){return"string"==typeof e?t.filterUsers(e):t.users})),this.selected.emit(null)},re.prototype.displayValue=function(e){return e?e.firstName+" "+e.lastName+" - "+e.email:""},re.prototype.onSelected=function(e){this.selected.emit(e.option.value)},re.prototype.clear=function(){this.control.setValue(null)},re.prototype.onUserChange=function(e){e&&e.email||this.selected.emit(null)},re.prototype.filterUsers=function(t){return t?(t=t.toLowerCase(),this.users.filter(function(e){return!!e.firstName.toLowerCase().includes(t)||(!!e.lastName.toLowerCase().includes(t)||!!e.email.toLowerCase().includes(t))})):[]},re.decorators=[{type:g.Component,args:[{selector:"xuilib-user-select",template:'<input class="govuk-input" type="text" [matAutocomplete]="dropdown" [formControl]="control" (ngModelChange)="onUserChange($event)" aria-labelledby="add-user-hint">\n\n<mat-autocomplete #dropdown="matAutocomplete" [displayWith]="displayValue" autoActiveFirstOption (optionSelected)="onSelected($event)">\n <mat-option *ngFor="let user of filteredUsers | async" [value]="user">\n {{ user.firstName }} {{ user.lastName }} - {{ user.email }}\n </mat-option>\n</mat-autocomplete>',styles:[""]}]}],re.ctorParameters=function(){return[]},re.propDecorators={users:[{type:g.Input}],selected:[{type:g.Output}]},re);function re(){this.selected=new g.EventEmitter,this.control=new d.FormControl}var ae=(le.prototype.ngOnInit=function(){var t=this;this.shareCases$.pipe(m.tap(function(e){t.getAssignedUsers(e.filter(function(e){return e.sharedWith&&0<e.sharedWith.length}))})).subscribe(function(e){t.shareCases=e,t.stateService.setCases(e),e&&(t.selectedCasesErrorMessageConfig={id:0<e.length?"cases":"noCaseDisplay"})}),this.shareCases$=this.stateService.state,this.shareCaseErrorMessage={isInvalid:!1,messages:[]}},le.prototype.onUnselect=function(e){this.validationErrors=[],1===this.stateService.getCases().length?(this.validationErrors.push({id:"cases",message:ie.OneCaseMustBeSelected}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.OneCaseMustBeSelected]},window.scrollTo({top:0,left:0,behavior:"smooth"})):(this.unselect.emit(e),this.stateService.removeCase(e.caseId))},le.prototype.onSynchronizeStore=function(e){this.synchronizeStore.emit(e)},le.prototype.onSelectedUser=function(e){this.selectedUser=e},le.prototype.addUser=function(){var e=this.stateService.requestShare(this.selectedUser);this.selectedUser=null,this.userSelect&&this.userSelect.clear(),this.synchronizeStore.emit(e),this.getAssignedUsers(e)},le.prototype.removeUser=function(){var e;this.selectedUserToRemove&&(e=this.stateService.requestUnshare(this.selectedUserToRemove),this.synchronizeStore.emit(e))},le.prototype.isDisabledAdd=function(){return null===this.selectedUser||0===this.shareCases.length},le.prototype.setContinueAllowed=function(){var a=this;this.continueAllowed=!1,this.shareCases$.subscribe(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.pendingShares&&0<s.pendingShares.length){a.continueAllowed=!0;break}if(s.pendingUnshares&&0<s.pendingUnshares.length){a.continueAllowed=!0;break}}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}})},le.prototype.onDeselect=function(e){var t,n;if(null!==e){var o=[];try{for(var i=y(this.shareCases),s=i.next();!s.done;s=i.next()){var r=s.value;r.caseId!==e.caseId&&o.push(r)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}this.shareCases=o}this.stateService.setCases(this.shareCases)},le.prototype.onContinue=function(){this.setContinueAllowed(),this.continueAllowed||(this.validationErrors=[],this.validationErrors.push({id:"cases",message:ie.NoChangesRequested}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.NoChangesRequested]},window.scrollTo({top:0,left:0,behavior:"smooth"})),this.continueAllowed&&(this.hasCasesLeftUnassigned(this.shareCases)?(this.validationErrors=[],this.validationErrors.push({id:"cases",message:ie.OnePersonMustBeAssigned}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.OnePersonMustBeAssigned]},window.scrollTo({top:0,left:0,behavior:"smooth"})):this.router.navigate([this.confirmLink]))},le.prototype.getAssignedUsers=function(e){var n=[];e.forEach(function(e){e.sharedWith&&e.sharedWith.forEach(function(t){n.some(function(e){return t.idamId===e.idamId})||n.push(t)}),e.pendingShares&&e.pendingShares.forEach(function(t){n.some(function(e){return t.idamId===e.idamId})||n.push(t)})}),this.assignedUsers=n},le.prototype.hasCasesLeftUnassigned=function(e){return e.some(function(e){return e.pendingUnshares&&e.sharedWith&&e.pendingUnshares.length===e.sharedWith.length&&(!e.pendingShares||0===e.pendingShares.length)})},le.decorators=[{type:g.Component,args:[{selector:"xuilib-share-case",template:'<xuilib-hmcts-error-summary\n [errorMessages]="validationErrors"\n [header]="\'There is a problem\'"\n></xuilib-hmcts-error-summary>\n<h1 *ngIf="title" class="govuk-heading-xl govuk-!-margin-top-2">\n <span *ngIf="fnTitle" class="govuk-caption-xl">{{fnTitle}}</span>\n {{title}}\n</h1>\n<div id="add-user">\n <div class="govuk-form-group">\n <label class="govuk-label govuk-!-font-weight-bold" for="add-user-input">{{addUserLabel}}</label>\n <span id="add-user-hint" class="govuk-hint">\n Search by name or email address. You can share access with as many people as you need.\n </span>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <xuilib-user-select\n id="add-user-input"\n aria-describedby="add-user-hint"\n [users]="users"\n (selected)="onSelectedUser($event)">\n </xuilib-user-select>\n </div>\n <div class="govuk-grid-column-one-thirds">\n <button id="btn-add-user" (click)="addUser()" class="govuk-button govuk-button--secondary" [disabled]="isDisabledAdd()" title="Add user to selected cases">Add</button>\n </div>\n </div>\n <details id="add-user-help" class="govuk-details" data-module="govuk-details">\n <summary class="govuk-details__summary">\n <span id="content-why-can-not-find-email" class="govuk-details__summary-text">\n Can\'t find an email address?\n </span>\n </summary>\n <div id="content-reason-can-not-find-email" class="govuk-details__text">\n If you can\'t find your colleague\'s email address, they will need to complete their registration. Contact your\n administrator for help.\n </div>\n </details>\n </div>\n <div class="govuk-form-group" *ngIf="showRemoveUsers">\n <label class="govuk-label govuk-!-font-weight-bold" for="remove-user-input">Remove a person from all cases</label>\n <span id="remove-user-hint" class="govuk-hint">\n Select a person to remove them from all selected cases.\n </span>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <select [(ngModel)]="selectedUserToRemove" class="govuk-select" id="remove-user-input" aria-describedby="remove-user-hint">\n <option [ngValue]="null" selected>Select a person</option>\n <option *ngFor="let user of assignedUsers" [ngValue]="user">{{user.firstName}} {{user.lastName}} - {{user.email}}</option>\n </select>\n </div>\n <div class="govuk-grid-column-one-thirds">\n <button id="btn-remove-user" (click)="removeUser()" class="govuk-button govuk-button--secondary" title="Remove user from selected cases">Remove</button>\n </div>\n </div>\n </div>\n</div>\n\n<div id="cases" [ngClass]="{\'govuk-form-group--error\': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}">\n <h3 id="title-selected-cases" class="govuk-heading-m">Selected cases</h3>\n <xuilib-gov-uk-error-message [config]="selectedCasesErrorMessageConfig" [errorMessage]="shareCaseErrorMessage"></xuilib-gov-uk-error-message>\n <div *ngIf="shareCases && shareCases.length > 0" class="govuk-accordion" data-module="govuk-accordion" id="accordion-with-summary-sections">\n <xuilib-selected-case-list\n [shareCases$]="shareCases$"\n [removeUserFromCaseToggleOn]="removeUserFromCaseToggleOn"\n (unselect)="onUnselect($event)"\n (synchronizeStore)="onSynchronizeStore($event)"\n >\n </xuilib-selected-case-list>\n </div>\n\n <div id="noCaseDisplay" *ngIf="shareCases && shareCases.length === 0" class="govuk-hint"\n [ngClass]="{\'govuk-form-group--error\': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}">\n No cases to display.\n </div>\n\n</div>\n\n<div id="share-case-nav" class="govuk-button-group">\n <button id="btn-continue" class="govuk-button" data-module="govuk-button" (click)="onContinue()" title="Continue">Continue</button>\n <button id="btn-cancel" class="govuk-button govuk-button--secondary" data-module="govuk-button" title="Cancel" [routerLink]="cancelLink">Cancel</button>\n</div>\n',styles:["select{width:100%}"]}]}],le.ctorParameters=function(){return[{type:G},{type:p.Router}]},le.propDecorators={removeUserFromCaseToggleOn:[{type:g.Input}],shareCases$:[{type:g.Input}],users:[{type:g.Input}],confirmLink:[{type:g.Input}],cancelLink:[{type:g.Input}],addUserLabel:[{type:g.Input}],showRemoveUsers:[{type:g.Input}],fnTitle:[{type:g.Input}],title:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}],userSelect:[{type:g.ViewChild,args:[se]}]},le);function le(e,t){this.stateService=e,this.router=t,this.shareCases=[],this.continueAllowed=!1,this.selectedUserToRemove=null,this.removeUserFromCaseToggleOn=!1,this.users=[],this.confirmLink="",this.cancelLink="",this.showRemoveUsers=!1,this.fnTitle="",this.title="",this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter,this.validationErrors=[]}var ce=(ue.prototype.tabChanged=function(e){this.tabChange.emit(e)},ue.decorators=[{type:g.Component,args:[{selector:"xuilib-tab",template:'<mat-tab-group animationDuration="0ms" (selectedTabChange)="tabChanged($event)">\n <mat-tab *ngFor="let tabItem of tabItems; let last = last;" [label]="tabItem.text">\n </mat-tab>\n</mat-tab-group>'}]}],ue.ctorParameters=function(){return[]},ue.propDecorators={tabItems:[{type:g.Input}],tabChange:[{type:g.Output}]},ue);function ue(){this.tabChange=new g.EventEmitter}var de=(pe.prototype.onClick=function(){this.confirm.emit()},pe.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-confirm",template:'<div class="govuk-width-container">\n <main role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <div class="column-two-thirds">\n <h1 class="govuk-heading-xl">Using this service</h1>\n <h2 class="govuk-heading-m">Terms and conditions</h2>\n <p>We\'ve recently updated the\n <a\n routerLink="/terms-and-conditions"\n rel="noopener noreferrer"\n target="_blank"\n >terms and conditions</a\n >.\n </p>\n <p>You must review and accept them.\n </p>\n <p>\n <button class="govuk-button" (click)="onClick()">\n {{ buttonText }}\n </button>\n </p>\n </div>\n </div>\n </div>\n <div class="govuk-grid-column-one-third"></div>\n </main>\n</div>\n',styles:[""]}]}],pe.ctorParameters=function(){return[]},pe.propDecorators={buttonText:[{type:g.Input}],confirm:[{type:g.Output}]},pe);function pe(){this.confirm=new g.EventEmitter}var ge=(he.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-display-html",template:"<ng-content></ng-content>",styles:[":host{display:block;width:100%}"]}]}],he.ctorParameters=function(){return[]},he);function he(){}var me=(fe.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-display-plain",template:"<ng-content></ng-content>",styles:[":host{display:block;width:100%}"]}]}],fe.ctorParameters=function(){return[]},fe);function fe(){}var ve=(be.decorators=[{type:g.Component,args:[{selector:"xuilib-terms-and-conditions",template:'<ng-container [ngSwitch]="document.mimeType">\n <xuilib-tc-display-html *ngSwitchCase="\'text/html\'">\n <div [innerHTML]="document.content"></div>\n </xuilib-tc-display-html>\n <xuilib-tc-display-plain *ngSwitchCase="\'text/plain\'">\n {{ document.content }}\n </xuilib-tc-display-plain>\n <div *ngSwitchDefault>\n An error occured. Please try again.\n </div>\n</ng-container>\n',styles:[":host{display:block;width:100%}"]}]}],be.ctorParameters=function(){return[]},be.propDecorators={document:[{type:g.Input}]},be);function be(){}var ye=(ke.prototype.reinviteClick=function(e){this.reinvite.emit(e)},ke.prototype.suspendUser=function(e){this.suspendUserEvent.emit(e)},ke.prototype.userHasRole=function(e){return!(!this.user||!this.user.roles)&&this.user.roles.includes(e)},ke.decorators=[{type:g.Component,args:[{selector:"xuilib-user-details",template:'<div class="govuk-warning-text" *ngIf="warningTitle && warningTitle !== \'\'">\n<span class="govuk-warning-text__icon">!</span>\n<strong class="govuk-warning-text__text">\n {{ warningTitle }}\n</strong>\n</div>\n<table class="govuk-table" *ngIf="user">\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="row">Name</th>\n <td class="govuk-table__cell">{{user.fullName}}</td>\n <td class="govuk-table__cell"></td>\n </tr>\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="row">Email address</th>\n <td class="govuk-table__cell">{{user.email}}</td>\n <td class="govuk-table__cell"></td>\n </tr>\n <tr class="govuk-table__row" *ngIf="!user.resendInvite">\n <th class="govuk-table__header" scope="row">Permissions</th>\n <td class="govuk-table__cell">\n <div *ngIf="user.manageOrganisations === \'Yes\'">Manage organisations</div>\n <div *ngIf="user.manageUsers === \'Yes\'">Manage users</div>\n <div *ngIf="user.manageCases === \'Yes\'">Manage cases</div>\n <div *ngIf="userHasRole(\'pui-caa\')">Case access administrator</div>\n <div *ngIf="userHasRole(\'pui-finance-manager\')">Manage fee accounts</div>\n </td>\n <td class="govuk-table__cell"><a *ngIf="editPermissionRouterLink && showEditLink" [routerLink]="editPermissionRouterLink">Change <span class="govuk-visually-hidden">roles</span></a></td>\n </tr>\n </tbody>\n</table>\n<button *ngIf="showSuspendUserButton" class="govuk-button govuk-button--warning" (click)="suspendUser(user)">\n Suspend account\n</button>\n<div *ngIf="user && user.resendInvite">\n <div class="govuk-inset-text">\n <p>This user has already been invited but has not activated their account.</p>\n <p>If you resend an invitation, they\'ll receive an email from HM Courts and Tribunals to finish setting up their account.</p>\n <p>You can\'t invite the same user more than once an hour.</p>\n </div>\n <a role="button" draggable="false" class="govuk-button" (click)="reinviteClick(user)" id="resend-invite-button">\n Resend invitation\n </a>\n</div>\n<p class="govuk-body" *ngIf="showHelpLink && suspendHelpLink"><a [routerLink]="suspendHelpLink" target="_blank">Get help</a> to reactivate this account.</p>\n',styles:[":host{display:block}"]}]}],ke.propDecorators={user:[{type:g.Input}],editPermissionRouterLink:[{type:g.Input}],warningTitle:[{type:g.Input}],showEditLink:[{type:g.Input}],showHelpLink:[{type:g.Input}],suspendHelpLink:[{type:g.Input}],suspendUserEvent:[{type:g.Output}],showSuspendUserButton:[{type:g.Input}],reinvite:[{type:g.Output}]},ke);function ke(){this.showEditLink=!1,this.showHelpLink=!1,this.suspendUserEvent=new g.EventEmitter,this.showSuspendUserButton=!1,this.reinvite=new g.EventEmitter}var Ce=(Ie.prototype.ngOnInit=function(){this.pagination={itemsPerPage:50,currentPage:this.currentPageNumber,totalItems:this.pageTotalSize}},Ie.prototype.onUserClick=function(e){this.userClick.emit(e)},Ie.prototype.emitPageClickEvent=function(e){this.currentPageNumber=e,this.pageChange.emit(e)},Ie.decorators=[{type:g.Component,args:[{selector:"xuilib-user-list",template:'<table class="govuk-table">\n\n <thead clas="govuk-table__head">\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="col">Name</th>\n <th class="govuk-table__header" scope="col">Email</th>\n <th class="govuk-table__header" scope="col">Status</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <ng-container *ngFor="let u of users | paginate: { itemsPerPage: pagination.itemsPerPage, currentPage: currentPageNumber, totalItems: pagination.totalItems }">\n <tr class="govuk-table__row" data-selector="table-row">\n <td class="govuk-table__cell" data-selector="table-cell">\n <a class="govuk-link" [attr.title]="u.routerLinkTitle" [routerLink]="u.routerLink" (click)="onUserClick(u)">{{ u.fullName }}</a>\n </td>\n <td class="govuk-table__cell" data-selector="table-cell">{{ u.email }}</td>\n <td class="govuk-table__cell" data-selector="table-cell">{{ u.status }}</td>\n </tr>\n </ng-container>\n </tbody>\n</table>\n<xuilib-hmcts-pagination (pageChange)="emitPageClickEvent($event)" [pageSize]="pagination.itemsPerPage"></xuilib-hmcts-pagination>\n',styles:[":host{display:block}"]}]}],Ie.propDecorators={users:[{type:g.Input}],currentPageNumber:[{type:g.Input}],pageTotalSize:[{type:g.Input}],userClick:[{type:g.Output}],pageChange:[{type:g.Output}]},Ie);function Ie(){this.users=[],this.userClick=new g.EventEmitter,this.pageChange=new g.EventEmitter}var we=(_e.prototype.setCookie=function(e,t,n){this.document.cookie=e+"="+t+";"+(n?" expires="+n:"")},_e.prototype.getCookie=function(t){return this.document.cookie.split("; ").find(function(e){return e.startsWith(t+"=")}).split("=")[1]},_e.prototype.deleteCookie=function(e,t,n){this.document.cookie=e+"="+(t?"; path="+t:"")+(n?"; domain="+n:"")+"; expires=Thu, 01 Jan 1970 00:00:01 GMT; max-age=0"},_e.prototype.deleteCookieByPartialMatch=function(t,n,o){var i=this;this.document.cookie.split("; ").filter(function(e){return e.startsWith(""+t)}).forEach(function(e){i.deleteCookie(e.split("=")[0],n,o)})},_e.prototype.checkCookie=function(t){return this.document.cookie.split("; ").some(function(e){return e.trim().startsWith(t+"=")})},_e.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],_e.ctorParameters=function(){return[{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},_e.ngInjectableDef=g.defineInjectable({factory:function(){return new _e(g.inject(a.DOCUMENT))},token:_e,providedIn:"root"}),_e);function _e(e){this.document=e}var xe=new g.InjectionToken("Window");function Se(){return window}var Le=(Ee.prototype.ngOnInit=function(){this.setState()},Ee.prototype.acceptCookie=function(){this.cookieService.setCookie(this.identifier,"true",this.getExpiryDate()),this.setState(!0)},Ee.prototype.rejectCookie=function(){this.cookieService.setCookie(this.identifier,"false",this.getExpiryDate()),this.setState(!0)},Ee.prototype.setState=function(e){void 0===e&&(e=!1),this.isCookieBannerVisible=!this.cookieService.checkCookie(this.identifier),this.areCookiesAccepted()?this.notifyAcceptance():this.notifyRejection(),e&&this.window.location.reload()},Ee.prototype.areCookiesAccepted=function(){return this.cookieService.checkCookie(this.identifier)&&"true"===this.cookieService.getCookie(this.identifier)},Ee.prototype.notifyRejection=function(){this.rejectionNotifier.emit()},Ee.prototype.notifyAcceptance=function(){this.acceptanceNotifier.emit()},Ee.prototype.getExpiryDate=function(){var e=new Date,t=e.getTime();return e.setTime(t+31536e6),e.toUTCString()},Ee.decorators=[{type:g.Component,args:[{selector:"xuilib-cookie-banner",template:'<div class="govuk-cookie-banner " role="region" attr.aria-label="\'Cookies on {{appName}}\'" *ngIf="isCookieBannerVisible">\n <div class="govuk-cookie-banner__message govuk-width-container">\n\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on {{appName}}</h2>\n\n <div class="govuk-cookie-banner__content">\n <p>We use some essential cookies to make this service work.</p>\n <p>We’d also like to use analytics cookies so we can understand how you use the service and make improvements.</p>\n </div>\n </div>\n </div>\n\n <div class="govuk-button-group">\n <button value="accept" type="button" name="cookies" class="govuk-button" data-module="govuk-button" (click)="acceptCookie()">\n Accept analytics cookies\n </button>\n <button value="reject" type="button" name="cookies" class="govuk-button" data-module="govuk-button" (click)="rejectCookie()">\n Reject analytics cookies\n </button>\n <a class="govuk-link" routerLink="/cookies">View cookies</a>\n </div>\n </div>\n</div>'}]}],Ee.ctorParameters=function(){return[{type:we},{type:undefined,decorators:[{type:g.Inject,args:[xe]}]}]},Ee.propDecorators={identifier:[{type:g.Input}],appName:[{type:g.Input}],rejectionNotifier:[{type:g.Output}],acceptanceNotifier:[{type:g.Output}]},Ee);function Ee(e,t){this.cookieService=e,this.rejectionNotifier=new g.EventEmitter,this.acceptanceNotifier=new g.EventEmitter,this.isCookieBannerVisible=!1,this.window=t}var Ae=function(){},Fe=function(){},De={NO_CHECK:"NO_CHECK",BOOKINGS_AND_BASE:"BOOKINGS_AND_BASE",POSSIBLE_BOOKINGS:"POSSIBLE_BOOKINGS"},Te={JUDICIAL:"Judicial",CASEWORKER:"Legal Ops",ADMIN:"Admin",CTSC:"CTSC",ALL:"All"},Me={JUDICIAL:"JUDICIAL",CASEWORKER:"LEGAL_OPERATIONS",ADMIN:"ADMIN",CTSC:"CTSC",ALL:"ALL"},Pe=function(){},Oe=(Ne.prototype.getAllLocations=function(e,t,n,o,i){return this.http.post("api/locations/getLocations",{serviceIds:e,locationType:t,searchTerm:n,userLocations:o,bookingLocations:i})},Ne.prototype.searchLocations=function(e,t,n){return this.http.get("api/prd/location/getLocations?serviceIds="+e+"&locationType="+t+"&searchTerm="+n)},Ne.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Ne.ctorParameters=function(){return[{type:s.HttpClient}]},Ne.ngInjectableDef=g.defineInjectable({factory:function(){return new Ne(g.inject(s.HttpClient))},token:Ne,providedIn:"root"}),Ne);function Ne(e){this.http=e}var Ue=(je.prototype.getItem=function(e,t){void 0===t&&(t=!1);var n=sessionStorage.getItem(e);return t&&this.removeItem(e),n},je.prototype.setItem=function(e,t){sessionStorage.setItem(e,t)},je.prototype.removeItem=function(e){sessionStorage.removeItem(e)},je.prototype.clear=function(){sessionStorage.clear()},je.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],je.ngInjectableDef=g.defineInjectable({factory:function(){return new je},token:je,providedIn:"root"}),je);function je(){}var Be=(Object.defineProperty(Re.prototype,"reset",{get:function(){return this.pReset},set:function(e){this.pReset=e,this.resetSearchTerm()},enumerable:!0,configurable:!0}),Object.defineProperty(Re.prototype,"selectedLocations",{get:function(){return this.pSelectedLocations},set:function(e){this.pSelectedLocations=e},enumerable:!0,configurable:!0}),Re.prototype.ngOnInit=function(){var e;this.singleMode&&0<this.selectedLocations.length&&(e=this.selectedLocations[0],this.form.controls.searchTerm.patchValue(e.site_name,{emitEvent:!1,onlySelf:!0})),this.search()},Re.prototype.filter=function(e){var t=this;this.getLocations(e).pipe(m.map(function(e){return t.removeSelectedLocations(e)}))},Re.prototype.onSelectionChange=function(e){this.form.controls.searchTerm.patchValue(e.site_name,{emitEvent:!1,onlySelf:!0}),this.locationSelected.emit(e)},Re.prototype.search=function(){var t=this;this.form.controls.searchTerm.valueChanges.pipe(m.tap(function(e){return t.locationInputChanged.next(e)}),m.tap(function(){return t.locations=[]}),m.tap(function(e){return t.term=e}),m.filter(function(e){return!!e&&e.length>=t.minSearchCharacters}),m.debounceTime(this.delay),m.mergeMap(function(e){return t.getLocations(e)}),m.map(function(e){return t.removeSelectedLocations(e)})).subscribe(function(e){return t.locations=e,t.cd.markForCheck(),1!==e.length||t.term!==e[0].site_name||t.singleMode?void(t.showAutocomplete=!0):(t.locationSelected.emit(e[0]),void(t.showAutocomplete=!1))})},Re.prototype.onInput=function(){this.searchLocationChanged.emit()},Re.prototype.getLocations=function(e){var t,n;return this.bookingCheck===De.BOOKINGS_AND_BASE?(t=JSON.parse(this.sessionStorageService.getItem("userLocations")),n=JSON.parse(this.sessionStorageService.getItem("bookingLocations"))):this.bookingCheck===De.POSSIBLE_BOOKINGS&&(this.serviceIds=this.serviceIds&&this.serviceIds.length?this.serviceIds:JSON.parse(this.sessionStorageService.getItem("bookableServices"))),this.locationService.getAllLocations(this.serviceIds,this.locationType,e,t,n)},Re.prototype.resetSearchTerm=function(){this.form.controls.searchTerm.patchValue("",{emitEvent:!1,onlySelf:!0})},Re.prototype.removeSelectedLocations=function(e){var t=this;return this.singleMode?e:e.filter(function(e){return!t.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)&&e.site_name})},Re.decorators=[{type:g.Component,args:[{selector:"exui-search-location",template:'<div class="auto-complete-container">\n <input\n id="inputLocationSearch"\n (input)="onInput()"\n [formControl]="form.controls.searchTerm"\n [matAutocomplete]="autoSearchLocation"\n class="govuk-input"\n [attr.disabled]="disabled">\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchLocation="matAutocomplete">\n <mat-option *ngFor="let location of locations"\n (onSelectionChange)="onSelectionChange(location)">\n {{ location.site_name }}\n </mat-option>\n <mat-option *ngIf="!locations.length && showAutocomplete && term && term.length >= this.minSearchCharacters">No results found</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]}]}],Re.ctorParameters=function(){return[{type:Oe},{type:Ue},{type:d.FormBuilder},{type:g.ChangeDetectorRef}]},Re.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],singleMode:[{type:g.Input}],locationType:[{type:g.Input}],serviceIds:[{type:g.Input}],submitted:[{type:g.Input}],delay:[{type:g.Input}],form:[{type:g.Input}],showAutocomplete:[{type:g.Input}],locations:[{type:g.Input}],bookingCheck:[{type:g.Input}],locationSelected:[{type:g.Output}],locationInputChanged:[{type:g.Output}],searchLocationChanged:[{type:g.Output}],reset:[{type:g.Input}],selectedLocations:[{type:g.Input}]},Re);function Re(e,t,n,o){this.locationService=e,this.sessionStorageService=t,this.fb=n,this.cd=o,this.disabled=null,this.singleMode=!1,this.locationType="",this.serviceIds="",this.submitted=!0,this.delay=500,this.showAutocomplete=!1,this.locations=[],this.locationSelected=new g.EventEmitter,this.locationInputChanged=new g.EventEmitter,this.searchLocationChanged=new g.EventEmitter,this.minSearchCharacters=3,this.term="",this.pSelectedLocations=[],this.pReset=!0,this.form=this.fb.group({searchTerm:[""]})}var Ve=(Object.defineProperty(Ge.prototype,"disabled",{get:function(){return this.pDisabled},set:function(e){e&&(this.searchLocationComponent.resetSearchTerm(),this.removeSelectedValues()),this.pDisabled=!0===this.disableInputField||null},enumerable:!0,configurable:!0}),Object.defineProperty(Ge.prototype,"services",{get:function(){return this.pServices},set:function(e){var t=this;this.pServices=e;var n=this.fields.find(function(e){return e.name===t.field.findLocationField});n&&(this.serviceIds="string"==typeof e?e:D(n.options,e).filter(function(e){return"services_all"!==e}).join(","))},enumerable:!0,configurable:!0}),Ge.prototype.ngOnInit=function(){this.selectedLocations=this.selectedLocations.filter(function(e){return e.epimms_id})},Ge.prototype.addLocation=function(){this.tempSelectedLocation&&(this.selectedLocations=C(this.selectedLocations,[this.tempSelectedLocation]),this.addSelectedLocationsToForm([this.tempSelectedLocation]),this.tempSelectedLocation=null,this.locations=[],this.searchLocationComponent.resetSearchTerm())},Ge.prototype.removeLocation=function(t){var e,n;t.epimms_id&&(this.selectedLocations=this.selectedLocations.filter(function(e){return e.epimms_id!==t.epimms_id}),-1<(n=(e=this.form.get(this.field.name)).value.findIndex(function(e){return e.epimms_id===t.epimms_id}))&&e.removeAt(n))},Ge.prototype.onInputChanged=function(e){"string"==typeof e&&1===this.field.maxSelected&&this.removeSelectedValues()},Ge.prototype.onSearchInputChanged=function(){this.locationFieldChanged.emit()},Ge.prototype.onLocationSelected=function(t){1===this.field.maxSelected?(this.removeSelectedValues(),this.addSelectedLocationsToForm([t])):this.selectedLocations.find(function(e){return e.epimms_id===t.epimms_id})||t.epimms_id&&(this.tempSelectedLocation=t)},Ge.prototype.removeSelectedValues=function(){for(var e=this.form.get(this.field.name),t=0;t<e.length;t++)e.removeAt(t);this.selectedLocations=[]},Ge.prototype.addSelectedLocationsToForm=function(e){var t,n,o=this.form.get(this.field.name);try{for(var i=y(e),s=i.next();!s.done;s=i.next()){var r=s.value;o.push(new d.FormControl(r))}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}},Ge.decorators=[{type:g.Component,args:[{selector:"xuilib-find-location",template:'<div class="location-picker-custom">\n <div class="search-location">\n <div>\n <label id="input-selected-location-label" *ngIf="locationTitle">{{locationTitle}}</label>\n </div>\n <exui-search-location class="search-location"\n [locations]="locations"\n [selectedLocations]="selectedLocations"\n [singleMode]="field.maxSelected === 1"\n [bookingCheck]="field.bookingCheckType"\n [delay]="300"\n [disabled]="disabled"\n [serviceIds]="serviceIds"\n (locationInputChanged)="onInputChanged($event)"\n (locationSelected)="onLocationSelected($event)"\n (searchLocationChanged)="onSearchInputChanged()"\n [locationType]="\'case-management\'"></exui-search-location>\n <a href="javascript:void(0)" (click)="addLocation()" class="govuk-button" data-module="govuk-button" *ngIf="enableAddLocationButton">\n Add location\n </a>\n </div>\n <ul class="hmcts-filter-tags selection-container" *ngIf="field.maxSelected != 1">\n <li class="location-selection" *ngFor="let selection of selectedLocations">\n <a class="hmcts-filter__tag" (click)="removeLocation(selection)" href="javascript:void(0)">\n {{ selection.site_name }}\n </a>\n </li>\n </ul>\n</div>\n',styles:[""]}]}],Ge.propDecorators={locationFieldChanged:[{type:g.Output}],selectedLocations:[{type:g.Input}],submitted:[{type:g.Input}],enableAddLocationButton:[{type:g.Input}],form:[{type:g.Input}],field:[{type:g.Input}],fields:[{type:g.Input}],locationTitle:[{type:g.Input}],disableInputField:[{type:g.Input}],searchLocationComponent:[{type:g.ViewChild,args:[Be]}],disabled:[{type:g.Input}],services:[{type:g.Input}]},Ge);function Ge(){this.locationFieldChanged=new g.EventEmitter,this.selectedLocations=[],this.submitted=!0,this.enableAddLocationButton=!0,this.locationTitle="Search for a location by name",this.disableInputField=!1,this.locations=[],this.tempSelectedLocation=null,this.serviceIds="SSCS,IA",this.pServices=[],this.pDisabled=!1}var ze=(We.prototype.onPrevious=function(){this.previousPage.emit(null)},We.prototype.onNext=function(){this.nextPage.emit(null)},We.decorators=[{type:g.Component,args:[{selector:"xuilib-pagination",template:'<nav class="hmcts-pagination" id="pagination-label">\n\n <p class="govuk-visually-hidden" aria-labelledby="pagination-label">Pagination navigation</p>\n\n <ul class="hmcts-pagination__list">\n <li class="hmcts-pagination__item hmcts-pagination__item--prev">\n <a *ngIf="firstRecord > 1; else noPrevious" class="hmcts-pagination__link" (click)="onPrevious()" href="javascript:void(0)">\n Previous page\n </a>\n <ng-template #noPrevious>\n <span class="hmcts-pagination__link">Previous page</span>\n </ng-template>\n </li>\n\n <li class="hmcts-pagination__item hmcts-pagination__item--next">\n <a *ngIf="moreItems; else noNext" class="hmcts-pagination__link" (click)="onNext()" href="javascript:void(0)">Next page</a>\n <ng-template #noNext>\n <span class="hmcts-pagination__link">Next page</span>\n </ng-template>\n </li>\n </ul>\n</nav>\n',styles:["span.hmcts-pagination__link:hover{color:revert}"]}]}],We.ctorParameters=function(){return[]},We.propDecorators={moreItems:[{type:g.Input}],firstRecord:[{type:g.Input}],previousPage:[{type:g.Output}],nextPage:[{type:g.Output}]},We);function We(){this.previousPage=new g.EventEmitter,this.nextPage=new g.EventEmitter}var He=(Object.defineProperty($e.prototype,"xuilibFeatureToggle",{set:function(e){this.feature=e,this.updateSubscription()},enumerable:!0,configurable:!0}),$e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},$e.prototype.updateSubscription=function(){var t=this;this.subscription=this.service.isEnabled(this.feature).subscribe(function(e){e?t.viewContainer.createEmbeddedView(t.templateRef):t.viewContainer.clear()})},$e.decorators=[{type:g.Directive,args:[{selector:"[xuilibFeatureToggle]"}]}],$e.ctorParameters=function(){return[{type:X},{type:g.ViewContainerRef},{type:g.TemplateRef}]},$e.propDecorators={xuilibFeatureToggle:[{type:g.Input}]},$e);function $e(e,t,n){this.service=e,this.viewContainer=t,this.templateRef=n}var qe=function(){this.$implicit=null,this.xuilibLet=null},Je=(Object.defineProperty(Ke.prototype,"xuilibLet",{set:function(e){this.context.$implicit=this.context.xuilibLet=e},enumerable:!0,configurable:!0}),Ke.decorators=[{type:g.Directive,args:[{selector:"[xuilibLet]"}]}],Ke.ctorParameters=function(){return[{type:g.ViewContainerRef},{type:g.TemplateRef}]},Ke.propDecorators={xuilibLet:[{type:g.Input}]},Ke);function Ke(e,t){this.viewContainer=e,this.context=new qe,this.viewContainer.createEmbeddedView(t,this.context)}var Ye=(Qe.decorators=[{type:g.Component,args:[{selector:"exui-page-wrapper",template:'<div class="page">\n <a *ngIf="backLink" [routerLink]="backLink" class="govuk-back-link">Back</a>\n <div class="govuk-width-container">\n <main id="content" role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <h1 *ngIf="title" class="govuk-heading-xl">\n <span *ngIf="fnTitle" class="govuk-caption-xl">{{fnTitle}}</span>\n {{title}}\n </h1>\n <ng-content>\n\n </ng-content>\n </div>\n </main>\n </div>\n</div>\n',styles:[".page{width:100%}"]}]}],Qe.ctorParameters=function(){return[]},Qe.propDecorators={backLink:[{type:g.Input}],title:[{type:g.Input}],fnTitle:[{type:g.Input}]},Qe);function Qe(){}var Xe=function(e){var t=[];return e.forEach(function(e){t=t.concat(e.caseworkers)}),t},Ze=function(e){return e+"-caseworkers"},et=(tt.prototype.find=function(e){var t=this,n=this.sessionStorageService.getItem("userDetails");return n&&!e.userIncluded&&(n=JSON.parse(n),this.userId=n.id||n.uid),this.assignedUser=e.assignedUser||null,this.http.post("/workallocation/findPerson",{searchOptions:e}).pipe(m.map(function(e){return e.filter(function(e){return![t.assignedUser,t.userId].includes(e.id)})}))},tt.prototype.findCaseworkers=function(t){var n=this,e=this.sessionStorageService.getItem("userDetails");e&&(o=JSON.parse(e),this.userId=o.id||o.uid),this.assignedUser=t.assignedUser||null;var o=t.services,i=[],s=[],r=[];if(o.forEach(function(e){var t=Ze(e);n.sessionStorageService.getItem(t)?(i.push(e),r.push({service:e,caseworkers:JSON.parse(n.sessionStorageService.getItem(t))})):s.push(e)}),i.length!==o.length)return this.http.post("/workallocation/retrieveCaseWorkersForServices",{fullServices:o}).pipe(m.tap(function(e){e.forEach(function(e){s.includes(e.service)&&function(e,t,n){e=Ze(e);n.setItem(e,JSON.stringify(t))}(e.service,e.caseworkers,n.sessionStorageService)})}),m.map(function(e){e=Xe(e);return n.searchInCaseworkers(e,t)}));o=Xe(r);return h.of(this.searchInCaseworkers(o,t))},tt.prototype.mapCaseworkers=function(e,n){var o=[];return e.forEach(function(e){var t={email:e.email,name:e.firstName+" "+e.lastName,id:e.idamId,domain:e.roleCategory===Me.CASEWORKER?Te.CASEWORKER:Te.ADMIN};e.roleCategory!==n&&n!==Me.ALL||o.push(t)}),o},tt.prototype.searchInCaseworkers=function(e,t){var n=this,o=Me.ALL;t.userRole!==Te.ALL&&(t.userRole===Te.CASEWORKER?o=Me.CASEWORKER:t.userRole===Te.ADMIN?o=Me.ADMIN:t.userRole===Te.CTSC&&(o=Me.CTSC));var i=t&&t.searchTerm?t.searchTerm.toLowerCase():"",o=(e?this.mapCaseworkers(e,o):[]).filter(function(e){return e&&e.name&&e.name.toLowerCase().includes(i)});return t.userIncluded?o.filter(function(e){return e&&e.id!==n.assignedUser}):o.filter(function(e){return e&&e.id!==n.userId&&e.id!==n.assignedUser})},tt.prototype.searchJudicial=function(e,t){return this.http.post("api/prd/judicial/getJudicialUsersSearch",{searchString:e,serviceCode:t})},tt.caseworkersKey="caseworkers",tt.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[{type:s.HttpClient},{type:Ue}]},tt.ngInjectableDef=g.defineInjectable({factory:function(){return new tt(g.inject(s.HttpClient),g.inject(Ue))},token:tt,providedIn:"root"}),tt);function tt(e,t){this.http=e,this.sessionStorageService=t}var nt=(ot.prototype.ngOnDestroy=function(){this.sub&&this.sub.unsubscribe()},ot.prototype.ngOnInit=function(){var t=this;this.findPersonControl=new d.FormControl(this.selectedPerson),this.findPersonGroup.addControl("findPersonControl",this.findPersonControl),this.sub=this.findPersonControl.valueChanges.pipe(m.tap(function(){return t.showAutocomplete=!1}),m.tap(function(){return t.filteredOptions=[]}),m.debounceTime(300),m.tap(function(e){return"string"==typeof e?t.personSelected.emit(null):void 0}),m.filter(function(e){return e&&e.length>t.minSearchCharacters}),m.switchMap(function(e){return t.filter(e).pipe(m.tap(function(){return t.showAutocomplete=!0}),m.catchError(function(){return t.filteredOptions=[]}))})).subscribe(function(e){t.filteredOptions=e,t.cd.detectChanges()})},ot.prototype.filter=function(e){var n=this,t=this.findPersonService.find({searchTerm:e,userRole:this.domain,services:this.services,userIncluded:this.userIncluded,assignedUser:this.assignedUser}),o=this.findPersonService.findCaseworkers({searchTerm:e,userRole:this.domain,services:this.services,userIncluded:this.userIncluded,assignedUser:this.assignedUser});if(e&&e.length>this.minSearchCharacters)switch(this.domain){case Te.JUDICIAL:return t.pipe(m.map(function(e){var t=n.selectedPersons.map(function(e){return e.id});return e.filter(function(e){e=e.id;return!t.includes(e)})}));case Te.ALL:return h.zip(t,o).pipe(m.map(function(e){return e[0].concat(e[1])}));case Te.CTSC:case Te.CASEWORKER:case Te.ADMIN:return o;default:return h.of([])}return h.of([])},ot.prototype.onSelectionChange=function(e){this.personSelected.emit(e),this.findPersonControl.setValue(this.getDisplayName(e),{emitEvent:!1,onlySelf:!0})},ot.prototype.getDisplayName=function(e){return e?e.domain===Te.JUDICIAL&&e.fullName?e.fullName+" ("+e.email+")":e.email?e.name+" ("+e.email+")":e.name:""},ot.prototype.onInput=function(){this.personFieldChanged.emit()},ot.decorators=[{type:g.Component,args:[{selector:"xuilib-find-person",template:'<h1 class="govuk-heading-l" *ngIf="title && title.length">\n <span class="govuk-caption-l">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class="govuk-form-group" [formGroup]="findPersonGroup"\n [ngClass]="{\'form-group-error\': findPersonGroup.get(\'findPersonControl\').invalid && submitted}">\n <fieldset class="govuk-fieldset" aria-describedby="sub-title-hint">\n <div id="sub-title-hint" class="govuk-hint" *ngIf="subTitle && subTitle.length">\n {{subTitle}}\n </div>\n <span id="validation-error" class="govuk-error-message" *ngIf="findPersonGroup && findPersonGroup.errors">\n <span class="govuk-visually-hidden">Error:</span>{{findPersonGroup.errors.error ? findPersonGroup.errors.error : errorMessage}}\n </span>\n <input id="inputSelectPerson{{idValue}}" type="text" aria-label="select a person"\n formControlName="findPersonControl"\n [matAutocomplete]="auto"\n class="govuk-input govuk-!-width-one-third"\n [placeholder]="placeholderContent"\n [attr.disabled]="disabled"\n (input)="onInput()">\n <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onSelectionChange($event.option.value)">\n <mat-option *ngFor="let option of filteredOptions"\n [value]="option"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete, \'select-option\': showUpdatedColor}">\n {{getDisplayName(option)}}\n </mat-option>\n <mat-option [ngClass]="{\'select-option\': showUpdatedColor}" *ngIf="isNoResultsShown && !filteredOptions.length && showAutocomplete">No results found</mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n',styles:[".mat-option:hover{background:#2596be}.mat-option.select-option:hover{background:#1d70b8;color:#fff}.hide-autocomplete{display:none}"]}]}],ot.ctorParameters=function(){return[{type:et},{type:g.ChangeDetectorRef}]},ot.propDecorators={personSelected:[{type:g.Output}],personFieldChanged:[{type:g.Output}],title:[{type:g.Input}],boldTitle:[{type:g.Input}],subTitle:[{type:g.Input}],domain:[{type:g.Input}],findPersonGroup:[{type:g.Input}],selectedPerson:[{type:g.Input}],submitted:[{type:g.Input}],userIncluded:[{type:g.Input}],assignedUser:[{type:g.Input}],placeholderContent:[{type:g.Input}],isNoResultsShown:[{type:g.Input}],showUpdatedColor:[{type:g.Input}],selectedPersons:[{type:g.Input}],errorMessage:[{type:g.Input}],idValue:[{type:g.Input}],services:[{type:g.Input}],disabled:[{type:g.Input}]},ot);function ot(e,t){this.findPersonService=e,this.cd=t,this.personSelected=new g.EventEmitter,this.personFieldChanged=new g.EventEmitter,this.boldTitle="Find the person",this.subTitle="Type the name of the person and select them.",this.domain=Te.ALL,this.findPersonGroup=new d.FormGroup({}),this.submitted=!0,this.userIncluded=!1,this.placeholderContent="",this.isNoResultsShown=!0,this.showUpdatedColor=!1,this.selectedPersons=[],this.errorMessage="You must select a name",this.idValue="",this.services=["IA"],this.disabled=null,this.showAutocomplete=!1,this.filteredOptions=[],this.minSearchCharacters=2}var it=(st.prototype.addService=function(){},st.decorators=[{type:g.Component,args:[{selector:"xuilib-find-service",template:'<div class="service-picker-custom">\n <div class="search-service">\n <div>\n <label id="input-selected-service-label" *ngIf="serviceTitle">{{serviceTitle}}</label>\n </div>\n <exui-search-service class="search-service"\n [services]="services"\n [selectedServices]="selectedServices"\n [delay]="300"\n [disabled]="disabled"></exui-search-service>\n <a href="javascript:void(0)" (click)="addService()" class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0" \n data-module="govuk-button" *ngIf="enableAddServiceButton" id="add-service">\n Add\n </a>\n </div>\n <ul class="hmcts-filter-tags selection-container" *ngIf="field.maxSelected != 1">\n <li class="service-selection" *ngFor="let selection of selectedServices">\n <a class="hmcts-filter__tag" href="javascript:void(0)">\n {{ selection.name }}\n </a>\n </li>\n </ul>\n </div>',styles:["#add-service{background-color:#ddd}"]}]}],st.propDecorators={field:[{type:g.Input}],fields:[{type:g.Input}],serviceTitle:[{type:g.Input}],form:[{type:g.Input}],services:[{type:g.Input}],selectedServices:[{type:g.Input}],disabled:[{type:g.Input}],enableAddServiceButton:[{type:g.Input}],disableInputField:[{type:g.Input}]},st);function st(){this.serviceTitle="Search for a service by name",this.enableAddServiceButton=!0,this.disableInputField=!1}var rt=(at.prototype.ngOnInit=function(){var t=this;this.displayedJudicials=[],this.control&&this.formGroup&&this.formGroup.controls&&(this.formGroup.controls.selectedFormControl=this.control,this.formGroup.controls.formControl.setValue(this.getControlValueDisplayText())),this.keyUpSubject$.pipe(m.debounceTime(500)).subscribe(function(e){return t.search(e)})},at.prototype.onKeyDown=function(){this.judicialChanged.emit()},at.prototype.onKeyUp=function(e){this.showAutocomplete=!1,this.keyUpSubject$.next(e.target.value)},at.prototype.onFocus=function(){this.showAutocomplete=!1},Object.defineProperty(at.prototype,"displayedJudicialsDuplicationFiltered",{get:function(){var t=this;return this.displayedJudicials.filter(function(e){return!t.selectedJudicials.map(function(e){return e.idamId}).includes(e.idamId)})},enumerable:!0,configurable:!0}),at.prototype.filter=function(t){var n=this;this.searchJudicials(t,this.serviceId).pipe(m.mergeMap(function(e){e=e.filter(function(e){return!n.selectedJudicials.map(function(e){return e.idamId}).includes(e.idamId)});return n.displayedJudicials=e,n.searchInProgress=!1,e})).subscribe(function(e){t===e.fullName&&(n.formGroup.controls.selectedFormControl.setValue(e),n.displayedJudicials=[],n.judicialChanged.emit(e),n.showAutocomplete=!1),n.searchInProgress=!1})},at.prototype.onSelectionChange=function(e){this.formGroup.controls.formControl instanceof d.FormArray?this.formGroup.controls.selectedFormControl.push(new d.FormControl(e.idamId)):this.formGroup.controls.selectedFormControl.setValue(e),this.judicialChanged.emit(e)},at.prototype.search=function(e){this.searchInProgress=!0,this.showAutocomplete=!!e&&e.length>=this.minSearchCharacters,e?this.formGroup.controls.selectedFormControl.markAsDirty():this.formGroup.controls.selectedFormControl.reset(),this.showAutocomplete?this.filter(e):this.searchInProgress=!1},at.prototype.getDisplayName=function(e){return e.fullName+" ("+e.emailId+")"},at.prototype.searchJudicials=function(e,t){return this.judicialService.searchJudicial(e,t)},at.prototype.getControlValueDisplayText=function(){return this.formGroup&&this.formGroup.controls&&this.formGroup.controls.selectedFormControl.value?this.getDisplayName(this.formGroup.controls.selectedFormControl.value):""},at.decorators=[{type:g.Component,args:[{selector:"xuilib-search-judicials",template:'<div class="govuk-form-group">\n <input id="inputSelectPerson{{idValue}}" [placeholder]="placeholderContent" [formControl]="formGroup.controls.formControl"\n [matAutocomplete]="autoComplete" (keydown)="onKeyDown()" (keyup)="onKeyUp($event)" (focus)="onFocus()"\n class="govuk-input" [attr.disabled]="!disabled ? null: disabled" [value]="getControlValueDisplayText()"\n #inputSelection>\n <mat-autocomplete autoActiveFirstOption #autoComplete="matAutocomplete">\n <mat-option *ngFor="let judicial of displayedJudicialsDuplicationFiltered" class="select-option"\n [value]="getDisplayName(judicial)" (onSelectionChange)="onSelectionChange(judicial)"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete}">\n {{ getDisplayName(judicial) }}\n </mat-option>\n <mat-option class="select-option"\n *ngIf="!displayedJudicialsDuplicationFiltered?.length && showAutocomplete && !searchInProgress">\n {{ \'No results found\' }}</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".hide-autocomplete{display:none}.mat-option:hover{background:#2596be}.mat-option.select-option:hover{background:#1d70b8;color:#fff}"]}]}],at.ctorParameters=function(){return[{type:et},{type:d.FormBuilder}]},at.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],selectedJudicials:[{type:g.Input}],submitted:[{type:g.Input}],placeholderContent:[{type:g.Input}],showAutocomplete:[{type:g.Input}],displayedJudicials:[{type:g.Input}],judicialChanged:[{type:g.Output}],idValue:[{type:g.Input}],errorMessage:[{type:g.Input}],serviceId:[{type:g.Input}],autoCompleteInputBox:[{type:g.ViewChild,args:["inputSelection",{read:g.ElementRef}]}]},at);function at(e,t){this.judicialService=e,this.disabled=null,this.selectedJudicials=[],this.submitted=!0,this.placeholderContent="",this.showAutocomplete=!1,this.judicialChanged=new g.EventEmitter,this.idValue="",this.errorMessage="You must select a name",this.serviceId="",this.minSearchCharacters=3,this.keyUpSubject$=new h.Subject,this.searchInProgress=!1,this.formGroup=t.group({formControl:[null],selectedFormControl:[null]})}var lt=(ct.prototype.onInput=function(){},ct.prototype.onSelectionChange=function(){},ct.decorators=[{type:g.Component,args:[{selector:"exui-search-service",template:'<div class="auto-complete-container">\n <input\n id="inputServiceSearch"\n (input)="onInput()"\n [formControl]="form?.controls.searchTerm"\n [matAutocomplete]="autoSearchService"\n class="govuk-input"\n [attr.disabled]="disabled">\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchService="matAutocomplete">\n <mat-option *ngFor="let service of services" (onSelectionChange)="onSelectionChange()">\n {{ service.name }}\n </mat-option>\n <mat-option *ngIf="!services?.length && showAutocomplete && term && term.length >= this.minSearchCharacters">No results found</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]}]}],ct.propDecorators={services:[{type:g.Input}],selectedServices:[{type:g.Input}],disabled:[{type:g.Input}],delay:[{type:g.Input}],form:[{type:g.Input}],showAutocomplete:[{type:g.Input}]},ct);function ct(){this.showAutocomplete=!1,this.minSearchCharacters=3,this.term=""}var ut=(dt.prototype.ngAfterContentInit=function(){this.readyAfterContent=!0},dt.prototype.ngOnInit=function(){var t=this;this.displayedLocations=[],this.control&&this.findLocationFormGroup&&this.findLocationFormGroup.controls&&(this.findLocationFormGroup.controls.locationSelectedFormControl=this.control),this.keyUpSubject$.pipe(m.debounceTime(500)).subscribe(function(e){return t.search(e)})},dt.prototype.onKeyDown=function(){this.locationChanged.emit()},dt.prototype.onKeyUp=function(e){this.showAutocomplete=!1,this.keyUpSubject$.next(e.target.value)},dt.prototype.onFocus=function(){this.showAutocomplete=!1},Object.defineProperty(dt.prototype,"displayedLocationsDuplicationFiltered",{get:function(){var t=this;return this.displayedLocations.filter(function(e){return!t.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)&&e.court_name})},enumerable:!0,configurable:!0}),dt.prototype.filter=function(t){var n=this;this.searchLocations(t).pipe(m.mergeMap(function(e){e=e.filter(function(e){return!n.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)});return n.displayedLocations=e,n.searchInProgress=!1,e})).subscribe(function(e){t===e.court_name&&(n.findLocationFormGroup.controls.locationSelectedFormControl.setValue(e),n.displayedLocations=[],n.locationChanged.emit(e),n.showAutocomplete=!1),n.searchInProgress=!1})},dt.prototype.onSelectionChange=function(e){this.findLocationFormGroup.controls.findLocationFormControl instanceof d.FormArray?this.findLocationFormGroup.controls.locationSelectedFormControl.push(new d.FormControl(e.epimms_id)):this.findLocationFormGroup.controls.locationSelectedFormControl.setValue(e),this.locationChanged.emit(e)},dt.prototype.search=function(e){this.searchInProgress=!0,this.showAutocomplete=!!e&&e.length>=this.minSearchCharacters,e&&e.length||(this.findLocationFormGroup.controls.locationSelectedFormControl.markAsPristine(),this.findLocationFormGroup.controls.locationSelectedFormControl.reset()),this.showAutocomplete?this.filter(e):this.searchInProgress=!1},dt.prototype.getDisplayName=function(e){return e.court_name},dt.prototype.searchLocations=function(e){return this.locationService.searchLocations(this.serviceIds,this.locationType,e)},dt.prototype.getControlCourtNameValue=function(){return this.findLocationFormGroup&&this.findLocationFormGroup.controls&&this.findLocationFormGroup.controls.locationSelectedFormControl.value?this.findLocationFormGroup.controls.locationSelectedFormControl.value.court_name:""},dt.decorators=[{type:g.Component,args:[{selector:"xuilib-search-venue",template:'<div class="auto-complete-container">\n <div *ngIf="readyAfterContent" class="autocomplete__wrapper">\n <input\n [formControl]="findLocationFormGroup.controls.findLocationFormControl"\n [matAutocomplete]="autoSearchLocation"\n (keydown)="onKeyDown()"\n (keyup)="onKeyUp($event)"\n (focus)="onFocus()"\n class="autocomplete__input autocomplete__input--default search-box"\n [attr.disabled]="!disabled ? null: disabled"\n [value]="getControlCourtNameValue()"\n #inputSelectedLocation>\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchLocation="matAutocomplete">\n <mat-option *ngFor="let location of displayedLocationsDuplicationFiltered"\n [value]="getDisplayName(location)"\n (onSelectionChange)="onSelectionChange(location)"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete}">\n {{ getDisplayName(location) }}\n </mat-option>\n <mat-option *ngIf="!displayedLocationsDuplicationFiltered?.length && showAutocomplete && !searchInProgress">{{ \'No results found\' }}</mat-option>\n </mat-autocomplete>\n </div>\n</div>\n',styles:[".autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%;background-color:transparent;position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:#fd0 solid 3px;outline-offset:0;box-shadow:inset 0 0 0 2px}.autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}"]}]}],dt.ctorParameters=function(){return[{type:Oe},{type:d.FormBuilder}]},dt.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],locationType:[{type:g.Input}],selectedLocations:[{type:g.Input}],serviceIds:[{type:g.Input}],submitted:[{type:g.Input}],autoCompleteInputBox:[{type:g.ViewChild,args:["inputSelectedLocation",{read:g.ElementRef}]}],showAutocomplete:[{type:g.Input}],displayedLocations:[{type:g.Input}],locationChanged:[{type:g.Output}]},dt);function dt(e,t){this.locationService=e,this.disabled=null,this.locationType="",this.serviceIds="",this.submitted=!0,this.showAutocomplete=!1,this.locationChanged=new g.EventEmitter,this.minSearchCharacters=3,this.keyUpSubject$=new h.Subject,this.readyAfterContent=!1,this.searchInProgress=!1,this.findLocationFormGroup=t.group({findLocationFormControl:[null],locationSelectedFormControl:[null]}),this.selectedLocations=[]}var pt=(gt.prototype.ngOnInit=function(){var e=this.config.focusOn||this.config.value;this.config.id=e,this.config.classes=this.config.classes?this.config.classes.concat(" govuk-checkboxes__label"):"govuk-checkboxes__label"},gt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-checkbox",template:'<div class="govuk-checkboxes__item" [formGroup]="group">\n <input class="govuk-checkboxes__input" type="checkbox" [attr.aria-describedby]="config.hint ? config.value+\'-item-hint\' : null"\n [id]="config.id" [name]="config.name" [formControlName]="config.value" [checked]="isChecked">\n <xuilib-gov-label appRemoveHost [config]="config"></xuilib-gov-label>\n <span [id]="config.value+\'-item-hint\'" class="govuk-hint govuk-checkboxes__hint">\n {{config.hint}}\n </span>\n</div>'}]}],gt.ctorParameters=function(){return[]},gt.propDecorators={group:[{type:g.Input}],config:[{type:g.Input}],isChecked:[{type:g.Input}]},gt);function gt(){this.isChecked=!1}var ht=(mt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-checkboxes",template:'<xuilib-gov-uk-form-group-wrapper\n[error]="errors"\n[config]="options.config"\n[group]="options.key">\n<div class="govuk-checkboxes">\n <xuilib-gov-checkbox *ngFor="let item of options.items"\n [group]="item.group"\n [config]="item.config">\n </xuilib-gov-checkbox>\n</div>\n</xuilib-gov-uk-form-group-wrapper>'}]}],mt.propDecorators={options:[{type:g.Input}],errors:[{type:g.Input}]},mt);function mt(){}var ft=(vt.prototype.ngOnInit=function(){this.day=this.config.id+"_day",this.month=this.config.id+"_month",this.year=this.config.id+"_year";var e=this.DateValidator();this.formGroup.get(this.day).setValidators(e)},vt.prototype.isValidDate=function(e,t,n){var o=!isNaN(e.getTime()),t=e.getMonth()===t,n=e.getFullYear()===n;return o&&t&&n},vt.prototype.isEmpty=function(e){return null==e||""===e||isNaN(e)||e<0},vt.prototype.DateValidator=function(){var o=this;return function(){var e=o.formGroup.get(o.day).value,t=o.formGroup.get(o.month).value-1,n=o.formGroup.get(o.year).value;return o.isOptional&&o.isEmpty(e)&&o.isEmpty(t)&&o.isEmpty(n)||o.isValidDate(new Date(n,t,e),t,+n)?null:{dateComponent:!0}}},vt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-date",template:'<div class="govuk-form-group" [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}" [formGroup]="formGroup">\n <div class="date-input-container">\n <xuilib-gov-uk-fieldset\n [config]="{\n legend: config.label || \'Date component\',\n classes: config.classes || \'govuk-label--m\',\n id: config.id,\n hint: config.hint != null ? config.hint : \'For example, 12 11 2007\',\n isPageHeading: config.isPageHeading || false}"\n [errorMessage]="errorMessage">\n <xuilib-gov-uk-error-message\n [config]="{id: \'passport\'}"\n *ngIf="errorMessage"\n [errorMessage]="errorMessage">\n </xuilib-gov-uk-error-message>\n <div class="govuk-date-input" [id]="config.id+\'-date\'">\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Day\', name: config.id+\'-day\', id: config.id+\'-day\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-2"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id"\n [name]="config.id+\'-day\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_day\'">\n </div>\n </div>\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Month\', name: config.id+\'-month\', id: config.id+\'-month\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-2"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id+\'-month\'"\n [name]="config.id+\'-month\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_month\'">\n </div>\n </div>\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Year\', name: config.id+\'-year\', id: config.id+\'-year\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-4"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id+\'-year\'"\n [name]="config.id+\'-year\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_year\'">\n </div>\n </div>\n </div>\n </xuilib-gov-uk-fieldset>\n </div>\n</div>\n',styles:[".govuk-form-group .date-input-container{margin-bottom:30px}.govuk-form-group .date-input-container .govuk-date-input .govuk-date-input__item .govuk-form-group{margin-bottom:0}"]}]}],vt.ctorParameters=function(){return[]},vt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}],formGroup:[{type:g.Input}],isOptional:[{type:g.Input}]},vt);function vt(){this.isOptional=!1}var bt=(yt.decorators=[{type:g.Component,args:[{selector:" xuilib-gov-uk-error-message",template:'<span class="govuk-error-message" [id]="config.id + \'-error\'" *ngFor="let message of errorMessage?.messages">\n <span class="govuk-visually-hidden">Error:</span>{{message}}\n</span>'}]}],yt.ctorParameters=function(){return[]},yt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}]},yt);function yt(){}var kt=(Ct.setDescribedBy=function(e,t){return e&&e&&e.isInvalid?t.hint?t.id+"-hint "+t.id+"-error":t.id+"-error":t.hint?t.id+"-hint":null},Ct);function Ct(){}var It=(wt.prototype.setDescribedBy=function(){return kt.setDescribedBy(this.errorMessage,this.config)},wt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-fieldset",template:'<fieldset class="govuk-fieldset" [attr.aria-describedby]="setDescribedBy()">\n <legend [class]="config.classes + \' govuk-fieldset__legend\'" *ngIf="!config.isPageHeading">\n {{config.legend}}\n </legend>\n\n <legend [class]="config.classes + \' govuk-fieldset__legend\'" *ngIf="config.isPageHeading">\n <h1>{{config.legend}}</h1>\n </legend>\n\n <span [id]="config.id+\'-hint\'" class="govuk-hint" *ngIf="config.hint">\n {{config.hint}}\n </span>\n <ng-content></ng-content>\n</fieldset>'}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}]},wt);function wt(){}var _t=(xt.prototype.ngOnInit=function(){this.config.classes="govuk-label--m"},xt.prototype.setDescribedBy=function(){return kt.setDescribedBy(this.errorMessage,this.config)},xt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-file-upload",template:'<div class="govuk-form-group" [formGroup]="group"\n [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n\n <xuilib-gov-label [config]="config"></xuilib-gov-label>\n\n <span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n </span>\n\n <xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n <input class="govuk-file-upload"\n *ngIf="reloadInput"\n [formControlName]="config.id"\n [ngClass]="{\'govuk-file-upload--error\': errorMessage?.isInvalid}"\n [id]="config.id" [name]="config.name"\n [attr.aria-describedby]="setDescribedBy()"\n type="file">\n </div>'}]}],xt.ctorParameters=function(){return[]},xt.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},xt);function xt(){this.reloadInput=!0}var St=(Lt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-form-group-wrapper",template:'<div class="govuk-form-group" [attr.formGroupName]="group" [ngClass]="{\'govuk-form-group--error\': (error?.isInvalid)}">\n <xuilib-gov-uk-fieldset\n [config]="{legend: config.legend, classes: \'govuk-label--m\', id: config.key, hint: config.hint, isPageHeading: config.isPageHeading}"\n [errorMessage]="error">\n\n <xuilib-gov-uk-error-message [config]="{id: group}" [errorMessage]="error"></xuilib-gov-uk-error-message>\n\n <ng-content></ng-content>\n\n </xuilib-gov-uk-fieldset>\n</div>'}]}],Lt.ctorParameters=function(){return[]},Lt.propDecorators={error:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},Lt);function Lt(){}var Et=(At.prototype.ngOnInit=function(){this.config.classes="govuk-label--m"},At.prototype.setDescribedBy=function(){return kt.setDescribedBy(this.errorMessage,this.config)},At.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-input",template:'<div class="govuk-form-group gov-uk-input" [formGroup]="group"\n[ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n\n<span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n</span>\n\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n<input class="govuk-input"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id"\n [name]="config.name"\n [type]="config.type"\n [attr.aria-invalid]="errorMessage?.isInvalid"\n [formControlName]="config.name"\n [attr.aria-describedby]=\'setDescribedBy()\'>\n</div>\n',styles:[".gov-uk-input input:disabled{background:#b1b4b6}"]}]}],At.ctorParameters=function(){return[]},At.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},At);function At(){}var Ft=(Dt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-label",template:'<h1 *ngIf="config.isPageHeading else noHeading">\n <label *ngIf="config.label" [class]="config.classes + \' govuk-label\'"\n [for]="config.id" [innerHTML]="config.label">\n </label>\n</h1>\n<ng-template #noHeading>\n <label *ngIf="config.label" [class]="config.classes + \' govuk-label\'"\n [for]="config.id" [innerHTML]="config.label">\n </label>\n</ng-template>'}]}],Dt.ctorParameters=function(){return[]},Dt.propDecorators={config:[{type:g.Input}]},Dt);function Dt(){}var Tt=(Mt.prototype.ngOnInit=function(){var e=this.config.focusOn||this.config.value;this.config.id=e,this.config.classes=this.config.classes?this.config.classes.concat(" govuk-radios__label"):"govuk-radios__label"},Mt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-radio",template:'<div class="govuk-radios__item" [formGroup]="group">\n <input [className]="\'govuk-radios__input \' + config.classes"\n [id]="config.id"\n [value]="config.value" type="radio"\n [attr.data-aria-controls]="config.id"\n [name]="config.name"\n [formControl]="group.controls[config.name]">\n <xuilib-gov-label appRemoveHost [config]="config"></xuilib-gov-label>\n</div>'}]}],Mt.ctorParameters=function(){return[]},Mt.propDecorators={group:[{type:g.Input}],config:[{type:g.Input}]},Mt);function Mt(){}var Pt=(Ot.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-radios",template:'<xuilib-gov-uk-form-group-wrapper\n[error]="errors"\n[config]="options.config"\n[group]="options.key">\n<div class="govuk-radios">\n <xuilib-gov-radio\n appRemoveHost\n *ngFor="let item of options.items"\n [group]="options.group"\n [config]="item.config">\n </xuilib-gov-radio>\n</div>\n</xuilib-gov-uk-form-group-wrapper>'}]}],Ot.propDecorators={options:[{type:g.Input}],errors:[{type:g.Input}]},Ot);function Ot(){}var Nt=(Ut.prototype.setDescribedBy=function(){return kt.setDescribedBy(this.errorMessage,this.config)},Ut.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-select",template:'<div class="govuk-form-group" [formGroup]="group"\n[ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n<span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n<select class="govuk-select" [id]="config.id" [name]="config.id" [formControlName]="config.id" [attr.aria-describedby]=\'setDescribedBy()\'>\n<option value="{{item.value}}" *ngFor="let item of items">{{item.label}}</option>\n</select>\n</div>'}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}],items:[{type:g.Input}]},Ut);function Ut(){}var jt=(Bt.prototype.formatDate=function(e){return a.formatDate(e,"dd/MM/yyyy","en-UK")},Bt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-table",template:'<table class="{{\'govuk-table \' + classes}}">\n <caption class="govuk-table__caption">{{caption}}</caption>\n <thead class="govuk-table__head" >\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="col" *ngFor="let h of columnConfig">{{h.header}}</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr data-selector="table-row" class="govuk-table__row" *ngFor="let r of rows">\n <ng-container *ngFor="let col of columnConfig; first as isFirst">\n <th data-selector="table-header" class="govuk-table__header" scope="row" *ngIf="isFirst && firstCellIsHeader">\n <ng-container *ngIf="!col.type || col.type === \'text\' || !r.routerLink">{{r[col.key]}}</ng-container>\n <ng-container *ngIf="col.type === \'link\' && r.routerLink">\n <a class="govuk-link" [routerLink]="r.routerLink">{{r[col.key]}}</a>\n </ng-container>\n </th>\n <td data-selector="table-cell" class="govuk-table__cell" *ngIf="!(isFirst && firstCellIsHeader)">\n <ng-container *ngIf="col.type === \'date\'">{{formatDate(r[col.key])}}</ng-container>\n <ng-container *ngIf="!col.type || col.type === \'text\' || !r.routerLink">{{r[col.key]}}</ng-container>\n <ng-container *ngIf="col.type === \'link\' && r.routerLink">\n <a class="govuk-link" [routerLink]="r.routerLink">{{r[col.key]}}</a>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </tbody>\n</table>\n',styles:[""]}]}],Bt.ctorParameters=function(){return[]},Bt.propDecorators={classes:[{type:g.Input}],caption:[{type:g.Input}],firstCellIsHeader:[{type:g.Input}],rows:[{type:g.Input}],columnConfig:[{type:g.Input}]},Bt);function Bt(){this.classes="",this.caption="Dates and amounts",this.firstCellIsHeader=!0,this.columnConfig=[{header:"Date",key:"date",type:"text"},{header:"Amount",key:"amount"}]}var Rt=(Vt.prototype.setDescribedBy=function(){return kt.setDescribedBy(this.errorMessage,this.config)},Vt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-textarea",template:'<div [formGroup]="group" \nclass="govuk-form-group" [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n<span id="more-detail-hint" class="govuk-hint">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n<textarea\n class="govuk-textarea" [formControlName]="config.key"\n [ngClass]="{\'govuk-textarea--error\': errorMessage?.isInvalid}"\n [id]="config.id" name="more-detail" [rows]="config.rows" [attr.aria-describedby]="setDescribedBy()"></textarea>\n</div>'}]}],Vt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}],group:[{type:g.Input}]},Vt);function Vt(){}var Gt=(zt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-banner",template:'<div class="hmcts-banner hmcts-banner--{{type}}">\n <svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" /></svg>\n <div class="hmcts-banner__message">\n <span class="hmcts-banner__assistive">{{type}}</span>\n {{message}}\n </div>\n</div>',styles:[":host{display:block;width:100%}"]}]}],zt.ctorParameters=function(){return[]},zt.propDecorators={type:[{type:g.Input}],message:[{type:g.Input}]},zt);function zt(){}var Wt=(Object.defineProperty(Ht.prototype,"errorMessages",{set:function(e){this.messages=e},enumerable:!0,configurable:!0}),Ht.prototype.ngAfterViewInit=function(){this.scrollTo("errorSummary")},Ht.prototype.ngOnChanges=function(e){e.errorMessages&&this.scrollTo("errorSummary")},Ht.prototype.scrollTo=function(e){this.document.querySelector("#"+e)&&this.document.querySelector("#"+e).focus()},Ht.prototype.hasElement=function(e){return this.document.querySelector("#"+e)},Ht.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-error-summary",template:'<div *ngIf="!showWarningMessage && messages && messages.length > 0" id="errorSummary" class="govuk-error-summary" aria-labelledby="error-summary-title" role="alert" tabindex="-1"\n data-module="error-summary">\n <h2 class="govuk-error-summary__title" id="error-summary-title">\n {{header}}\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li *ngFor="let message of messages">\n <a (click)="scrollTo(message[\'id\'])" [routerLink]="" [fragment]="message[\'id\']"\n *ngIf="hasElement(message[\'id\'])">{{message[\'message\']}}</a>\n <span *ngIf="!hasElement(message[\'id\'])">{{message[\'message\']}}</span>\n </li>\n </ul>\n </div>\n</div>\n<div *ngIf="showWarningMessage" class="hmcts-banner hmcts-banner--warning">\n <svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" /></svg>\n <div class="hmcts-banner__message">\n <span class="hmcts-banner__assistive">Warning</span>\n <p class="govuk-body" *ngFor="let message of messages">{{ message[\'message\'] }}</p>\n </div>\n</div>'}]}],Ht.ctorParameters=function(){return[{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},Ht.propDecorators={errorMessages:[{type:g.Input}],header:[{type:g.Input}],showWarningMessage:[{type:g.Input}]},Ht);function Ht(e){this.document=e}var $t=(Object.defineProperty(qt.prototype,"content",{set:function(e){this.value=e.name},enumerable:!0,configurable:!0}),qt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-identity-bar",template:'<div class="hmcts-identity-bar" *ngIf="value">\n\n <div class="hmcts-identity-bar__container">\n\n <div class="hmcts-identity-bar__details">\n \n <span class="hmcts-identity-bar__title">{{value}}</span>\n \n </div> \n\n </div>\n\n</div>',styles:[""]}]}],qt.ctorParameters=function(){return[]},qt.propDecorators={content:[{type:g.Input}]},qt);function qt(){}var Jt=(Object.defineProperty(Kt.prototype,"banner",{set:function(e){this.bannerData=e},enumerable:!0,configurable:!0}),Kt.prototype.ngOnInit=function(){this.hasBackLink=this.backLink!==undefined||0<this.backEvent.observers.length},Kt.prototype.onGoBack=function(){this.backEvent.emit()},Kt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-main-wrapper",template:'<a *ngIf="hasBackLink" [routerLink]="backLink" (click)="onGoBack()" class="govuk-back-link">Back</a>\n<main id="content" role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <xuilib-hmcts-error-summary\n *ngIf="summaryErrors && !summaryErrors.isFromValid"\n [errorMessages]="summaryErrors.items"\n [header]="summaryErrors.header"\n [showWarningMessage]="showWarningMessage">\n </xuilib-hmcts-error-summary>\n <xuilib-hmcts-banner *ngIf="bannerData" [message]="bannerData.message" [type]="bannerData.type"></xuilib-hmcts-banner>\n <h1 *ngIf="title" class="govuk-heading-xl">{{title}}</h1>\n <ng-content></ng-content>\n </div>\n <div class="govuk-grid-column-one-third" *ngIf="actionButtons?.length > 0">\n <div class="hmcts-page-heading__actions-wrapper">\n <a\n *ngFor="let actionButton of actionButtons"\n (click)="actionButton.action()"\n role="button"\n draggable="false"\n class="govuk-button {{ actionButton.class }}"\n >{{ actionButton.name }}</a>\n </div>\n </div>\n </div>\n</main>\n'}]}],Kt.ctorParameters=function(){return[]},Kt.propDecorators={backLink:[{type:g.Input}],title:[{type:g.Input}],summaryErrors:[{type:g.Input}],banner:[{type:g.Input}],actionButtons:[{type:g.Input}],showWarningMessage:[{type:g.Input}],backEvent:[{type:g.Output}]},Kt);function Kt(){this.backEvent=new g.EventEmitter}var Yt=(Qt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-pagination",template:'<pagination-template #p="paginationApi" [id]="id" [maxSize]="maxSize" (pageChange)="pageChange.emit($event)"\n (pageBoundsCorrection)="pageBoundsCorrection.emit($event)">\n\n <nav class="hmcts-pagination" id="pagination-label">\n <p class="govuk-visually-hidden" aria-labelledby="pagination-label">Pagination navigation</p>\n <ul class="hmcts-pagination__list" *ngIf="!(p.pages.length <= 1)">\n\n <li class="hmcts-pagination__item hmcts-pagination__item--prev" [class.disabled]="p.isFirstPage()">\n <a [routerLink]="" class="hmcts-pagination__link" *ngIf="1 < p.getCurrent()" (keyup.enter)="p.previous()"\n (click)="p.previous()">Previous <span class="govuk-visually-hidden">set of pages</span></a>\n </li>\n\n <ng-container *ngIf="showPageNumbers">\n <li class="hmcts-pagination__item" [class.hmcts-pagination__item--active]="p.getCurrent() === page.value"\n [class.hmcts-pagination__item--dots]="page.label === \'...\'" *ngFor="let page of p.pages">\n <a class="hmcts-pagination__link" [routerLink]="" (keyup.enter)="p.setCurrent(page.value)"\n (click)="p.setCurrent(page.value)" *ngIf="p.getCurrent() !== page.value">\n <span class="govuk-visually-hidden">page </span>\n <span>{{ (page.label === \'...\') ? page.label : (page.label | number:\'\') }}</span>\n </a>\n <ng-container *ngIf="p.getCurrent() === page.value">\n <span>{{ (page.label === \'...\') ? page.label : (page.label | number:\'\') }}</span>\n </ng-container>\n </li>\n </ng-container>\n\n <li class="hmcts-pagination__item hmcts-pagination__item--next" [class.disabled]="p.isLastPage()">\n <a [routerLink]="" class="hmcts-pagination__link" *ngIf="!p.isLastPage()" (keyup.enter)="p.next()"\n (click)="p.next()">Next<span class="govuk-visually-hidden"> page</span></a>\n </li>\n\n </ul>\n <p class="hmcts-pagination__results" *ngIf="showResultCount">Showing <b>{{(p.getCurrent() * pageSize) - pageSize + 1}}</b>\n to <b>{{ p.getCurrent() * pageSize > p.getTotalItems() ? p.getTotalItems() : p.getCurrent() *\n pageSize}}</b> of <b>{{p.getTotalItems()}}</b> results</p>\n </nav>\n\n</pagination-template>',styles:[".hmcts-pagination__results{float:right}"]}]}],Qt.propDecorators={id:[{type:g.Input}],maxSize:[{type:g.Input}],pageSize:[{type:g.Input}],showPageNumbers:[{type:g.Input}],showResultCount:[{type:g.Input}],pageChange:[{type:g.Output}],pageBoundsCorrection:[{type:g.Output}]},Qt);function Qt(){this.maxSize=7,this.pageSize=10,this.showPageNumbers=!0,this.showResultCount=!0,this.pageChange=new g.EventEmitter,this.pageBoundsCorrection=new g.EventEmitter}var Xt=(Object.defineProperty(Zt.prototype,"userLoggedIn",{set:function(e){this.isUserLoggedIn=e},enumerable:!0,configurable:!0}),Zt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-primary-navigation",template:'<nav *ngIf="isUserLoggedIn" class="hmcts-primary-navigation" [attr.aria-label]="label">\n <div class="hmcts-primary-navigation__container">\n <div class="govuk-header__logo" *ngIf="isBrandedHeader"></div>\n <ul class="hmcts-primary-navigation__list">\n <li class="hmcts-primary-navigation__item" *ngFor="let item of items">\n <a class="hmcts-primary-navigation__link" [attr.aria-current]="item.active ? true: null" [routerLink]="item.href" [innerHTML]="item.text"></a>\n </li>\n </ul>\n </div>\n</nav>\n',styles:[""]}]}],Zt.ctorParameters=function(){return[]},Zt.propDecorators={userLoggedIn:[{type:g.Input}],label:[{type:g.Input}],items:[{type:g.Input}],isBrandedHeader:[{type:g.Input}]},Zt);function Zt(){}var en=(tn.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-sub-navigation",template:'<nav class="hmcts-sub-navigation" attr.aria-label="{{label}}" role="navigation" *ngIf="items">\n <ul class="hmcts-sub-navigation__list">\n <li class="hmcts-sub-navigation__item" *ngFor="let item of items">\n <a data-selector="sub-nav-link" class="hmcts-sub-navigation__link" [routerLink]="item.href"\n [attr.aria-current]="item.active ? \'page\' : null">\n {{item.text}}\n\n <span *ngIf="item.roundel && item.roundel > 0 " class="xui-alert-link__number"> {{item.roundel}} </span>\n </a>\n </li>\n </ul>\n</nav>\n',styles:[".xui-alert-link__number{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:.875rem;line-height:1.78571;border-radius:50%;background-color:#1d70b8;color:#fff;font-weight:700;width:25px;height:25px;margin-left:5px;text-align:center;display:inline-block;text-decoration:none}"]}]}],tn.propDecorators={label:[{type:g.Input}],items:[{type:g.Input}]},tn);function tn(){}var nn=(on.prototype.ngOnInit=function(){for(var e=this.el.nativeElement,t=e.parentElement;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},on.decorators=[{type:g.Directive,args:[{selector:"[appRemoveHost]"}]}],on.ctorParameters=function(){return[{type:g.ElementRef}]},on);function on(e){this.el=e}var sn=[Ye,ve,ge,me,de,_,He,Je,P,Ce,ye,j,N,ae,ne,$,J,W,se,ce,f,L,I,Y,ee,R,T,Le,nt,rt,Ve,Be,it,lt,ut,ze],rn=[$t,Yt,en,Xt,Wt,Jt,Gt,jt,Et,pt,St,Ft,bt,It,ft,ht,Tt,Pt,Nt,Rt,_t,nn],an=Se,ln=(cn.decorators=[{type:g.NgModule,args:[{declarations:C(sn,rn),imports:[a.CommonModule,d.FormsModule,d.ReactiveFormsModule,p.RouterModule.forChild([]),t.MatAutocompleteModule,o.MatTabsModule,n.MatInputModule,i.NgxPaginationModule],providers:[{provide:xe,useFactory:an}],exports:C(sn,rn,[i.PaginatePipe])}]}],cn);function cn(){}var un=(dn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],dn.ctorParameters=function(){return[]},dn.ngInjectableDef=g.defineInjectable({factory:function(){return new dn},token:dn,providedIn:"root"}),dn);function dn(){}var pn=(gn.prototype.canActivate=function(t){var n=this;return h.combineLatest.apply(void 0,C(t.data.needsFeaturesEnabled.map(function(e){return n.featureToggleService.getValueOnce(e,!1)}))).pipe(m.map(function(e){return e.every(function(e){return e})}),m.map(function(e){return e||n.router.parseUrl(t.data.featureDisabledRedirect)}))},gn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],gn.ctorParameters=function(){return[{type:X},{type:p.Router}]},gn.ngInjectableDef=g.defineInjectable({factory:function(){return new gn(g.inject(X),g.inject(p.Router))},token:gn,providedIn:"root"}),gn);function gn(e,t){this.featureToggleService=e,this.router=t}var hn=(mn.prototype.initialize=function(e,t){var n=this;void 0===e&&(e={anonymous:!0}),this.ready.next(!1),this.user=e,this.clientId=t,this.client=r.initialize(this.clientId,this.user,{}),this.client.on("ready",function(){n.client.identify(n.user).then(function(){return n.ready.next(!0)})})},mn.prototype.isEnabled=function(e){return this.getValue(e,!1)},mn.prototype.getArray=function(e){return this.getValue(e,[])},mn.prototype.getValue=function(t,e){var n=this;return this.features.hasOwnProperty(t)||(this.features[t]=new h.BehaviorSubject(e),this.ready.pipe(m.filter(function(e){return e}),m.map(function(){return n.client.variation(t,e)})).subscribe(function(e){n.features[t].next(e),n.client.on("change:"+t,function(e){n.features[t].next(e)})})),this.features[t].pipe(m.distinctUntilChanged())},mn.prototype.getValueOnce=function(e,t){var n=this;return this.ready.pipe(m.filter(function(e){return e}),m.map(function(){return n.client.variation(e,t)}))},mn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],mn.ngInjectableDef=g.defineInjectable({factory:function(){return new mn},token:mn,providedIn:"root"}),mn);function mn(){this.ready=new h.BehaviorSubject(!1),this.features={},this.user={anonymous:!0},this.clientId=""}var fn=(vn.prototype.init=function(e){this.googleAnalyticsKey=e;try{var t=this.document.createElement("script");t["async"]=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+this.googleAnalyticsKey,this.document.head.appendChild(t);var n=this.document.createElement("script");n.innerHTML="\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '"+this.googleAnalyticsKey+"', {'send_page_view': false});\n ",this.document.head.appendChild(n)}catch(o){console.error("Error appending google analytics"),console.error(o)}this.listenForRouteChanges()},vn.prototype.listenForRouteChanges=function(){var t=this;this.googleAnalyticsKey&&this.router.events.subscribe(function(e){e instanceof p.NavigationEnd&&t.window.gtag("config",t.googleAnalyticsKey,{page_path:e.urlAfterRedirects,page_title:t.title.getTitle()})})},vn.prototype.event=function(e,t){this.window.gtag("event",e,t)},vn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],vn.ctorParameters=function(){return[{type:p.Router},{type:l.Title},{type:undefined,decorators:[{type:g.Inject,args:[xe]}]},{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},vn.ngInjectableDef=g.defineInjectable({factory:function(){return new vn(g.inject(p.Router),g.inject(l.Title),g.inject(xe),g.inject(a.DOCUMENT))},token:vn,providedIn:"root"}),vn);function vn(e,t,n,o){this.router=e,this.title=t,this.window=n,this.document=o}var bn=(yn.prototype.init=function(e){this.googleTagManagerKey=e;try{this.window.dataLayer=this.window.dataLayer||[],this.window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var t=this.document.createElement("script");t["async"]=!0,t.src="https://www.googletagmanager.com/gtm.js?id="+this.googleTagManagerKey,this.document.head.appendChild(t)}catch(n){console.error("Error appending google tag manager"),console.error(n)}this.listenForRouteChanges()},yn.prototype.listenForRouteChanges=function(){var t=this;this.googleTagManagerKey&&this.router.events.subscribe(function(e){e instanceof p.NavigationEnd&&t.window.dataLayer.push({event:"pageview",page:{path:e.urlAfterRedirects,title:t.title.getTitle()}})})},yn.prototype.event=function(e,t){this.window.dataLayer.push({event:e,params:t})},yn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],yn.ctorParameters=function(){return[{type:p.Router},{type:l.Title},{type:undefined,decorators:[{type:g.Inject,args:[xe]}]},{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},yn.ngInjectableDef=g.defineInjectable({factory:function(){return new yn(g.inject(p.Router),g.inject(l.Title),g.inject(xe),g.inject(a.DOCUMENT))},token:yn,providedIn:"root"}),yn);function yn(e,t,n,o){this.router=e,this.title=t,this.window=n,this.document=o}kn.prototype.init=function(e){var t=this;this.idle.setIdleName(e.idleServiceName),this.idle.setTimeout(e.timeout);var n=new c.DocumentInterruptSource("mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll");this.idle.setInterrupts([n]),this.idle.onIdleEnd.pipe(m.delay(250)).subscribe(function(){t.appStateEmitter.next({type:"modal",countdown:undefined,isVisible:!1})}),this.idle.onTimeout.subscribe(function(){t.appStateEmitter.next({type:"signout"})}),this.idle.onTimeoutWarning.pipe(m.map(function(e){return 60<e?Math.ceil(e/60)+" minutes":e+" seconds"}),m.distinctUntilChanged()).subscribe(function(e){t.appStateEmitter.next({type:"modal",countdown:e,isVisible:!0})}),this.keepalive.interval(e.keepAliveInSeconds),this.keepalive.onPing.subscribe(function(){t.appStateEmitter.next({type:"keepalive"})});e=Math.floor(e.idleMilliseconds/1e3)-e.timeout;this.idle.setIdle(e),this.idle.watch()},kn.prototype.appStateChanges=function(){return this.appStateEmitter.asObservable()},kn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],kn.ctorParameters=function(){return[{type:c.Idle},{type:u.Keepalive}]},kn.ngInjectableDef=g.defineInjectable({factory:function(){return new kn(g.inject(c.Idle),g.inject(u.Keepalive))},token:kn,providedIn:"root"}),t=kn;function kn(e,t){this.idle=e,this.keepalive=t,this.appStateEmitter=new h.Subject}Cn.prototype.initialise=function(e){var t=this,n=e.idleServiceName,o=e.idleModalDisplayTime,e=e.totalIdleTime;this.idle.setIdleName(n);n=this.millisecondsToSeconds(o),o=this.millisecondsToSeconds(e);this.idle.setTimeout(n);e=new c.DocumentInterruptSource("mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll");this.idle.setInterrupts([e]),this.idle.onTimeout.subscribe(function(){t.eventEmitter.next({eventType:"sign-out"})}),this.idle.onTimeoutWarning.pipe(m.map(function(e){return 60<e?Math.ceil(e/60)+" minutes":e+" seconds"}),m.distinctUntilChanged()).subscribe(function(e){t.eventEmitter.next({eventType:"countdown",readableCountdown:e})}),this.keepalive.onPing.subscribe(function(){t.eventEmitter.next({eventType:"keep-alive"})});n=Math.floor(o)-n;this.idle.setIdle(n),this.idle.watch()},Cn.prototype.notificationOnChange=function(){return this.eventEmitter.asObservable()},Cn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Cn.ctorParameters=function(){return[{type:c.Idle},{type:u.Keepalive}]},Cn.ngInjectableDef=g.defineInjectable({factory:function(){return new Cn(g.inject(c.Idle),g.inject(u.Keepalive))},token:Cn,providedIn:"root"}),o=Cn;function Cn(e,t){this.idle=e,this.keepalive=t,this.millisecondsToSeconds=function(e){return e/1e3},this.eventEmitter=new h.Subject}var In=(Object.defineProperty(wn.prototype,"roles",{get:function(){return this.pRoles},set:function(e){this.pRoles=e},enumerable:!0,configurable:!0}),wn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],wn.ngInjectableDef=g.defineInjectable({factory:function(){return new wn},token:wn,providedIn:"root"}),wn);function wn(){this.pRoles=[]}var _n={ALL:0,ANY:1};_n[_n.ALL]="ALL",_n[_n.ANY]="ANY";xn.prototype.canActivate=function(e){var n=this,t=e.data.needsRole,o=function(e){var t=new RegExp(e);return n.roleService.roles.some(function(e){return t.test(e)})};return(e.data.roleMatching===_n.ALL?t.every(o):t.some(o))||this.router.parseUrl(e.data.noRoleMatchRedirect)},xn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],xn.ctorParameters=function(){return[{type:In},{type:p.Router}]},xn.ngInjectableDef=g.defineInjectable({factory:function(){return new xn(g.inject(In),g.inject(p.Router))},token:xn,providedIn:"root"}),n=xn;function xn(e,t){this.roleService=e,this.router=t}Object.defineProperty(Sn.prototype,"isLoading",{get:function(){},enumerable:!0,configurable:!0}),an=Sn;function Sn(){}Object.defineProperty(Ln.prototype,"isLoading",{get:function(){return this.loading.asObservable().pipe(m.distinctUntilChanged())},enumerable:!0,configurable:!0}),Ln.prototype.register=function(){var e=this.generateToken();return this.registered.set(e,e),this.loading.next(!0),e},Ln.prototype.unregister=function(e){this.registered["delete"](e),this.loading.next(0<this.registered.size)},Ln.prototype.generateToken=function(){return"common-lib-loading-"+window.performance.now()},Ln.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Ln.ngInjectableDef=g.defineInjectable({factory:function(){return new Ln},token:Ln,providedIn:"root"}),i=Ln;function Ln(){this.registered=new Map,this.loading=new h.BehaviorSubject(!1)}e.AccessibilityComponent=f,e.CheckboxListComponent=I,e.ContactDetailsComponent=_,e.DueDateComponent=L,e.GenericFilterComponent=T,e.HmctsSessionDialogComponent=P,e.InviteUserFormComponent=N,e.InviteUserPermissionComponent=j,e.LoadingSpinnerComponent=R,e.SelectedCaseConfirmComponent=W,e.SelectedCaseListComponent=$,e.SelectedCaseComponent=J,e.ServiceMessageComponent=Y,e.ServiceMessagesComponent=ee,e.ShareCaseConfirmComponent=ne,e.ShareCaseComponent=ae,e.TabComponent=ce,e.TcConfirmComponent=de,e.TcDisplayHtmlComponent=ge,e.TcDisplayPlainComponent=me,e.TermsAndConditionsComponent=ve,e.UserDetailsComponent=ye,e.UserListComponent=Ce,e.CookieBannerComponent=Le,e.FindLocationComponent=Ve,e.SearchLocationComponent=Be,e.PaginationComponent=ze,e.FeatureToggleDirective=He,e.LetContext=qe,e.LetDirective=Je,e.COMMON_COMPONENTS=sn,e.GOV_UI_COMPONENTS=rn,e.ExuiCommonLibModule=ln,e.GovUiService=un,e.checkboxesBeCheckedValidator=function(e){return void 0===e&&(e=1),function(t){var n=0;return Object.keys(t.controls).forEach(function(e){!0===t.controls[e].value&&n++}),n<e?{requireOneCheckboxToBeChecked:!0}:null}},e.dateValidator=function(){return function(e){var t=new Date(parseInt(e.controls.day.value,10),parseInt(e.controls.month.value,10)-1,parseInt(e.controls.year.value,10)-1);return t instanceof Date&&!isNaN(+t)?null:{dateIsInvalid:!0}}},e.radioGroupValidator=function(){return function(e){if(e.controls)for(var t in e.controls)if(!e.controls[t].valid)return{isRadioGroupInvalid:!0};return null}},e.HmctsSubNavigationComponent=en,e.SharedCaseErrorMessages=ie,e.BadgeColour={BADGE_RED:"hmcts-badge--red",BADGE_BLUE:"hmcts-badge--blue",BADGE_GREEN:"hmcts-badge--green"},e.DateBadgeColour=S,e.SECONDS_IN_A_DAY=86400,e.AnonymousFeatureUser=Ae,e.LoggedInFeatureUser=Fe,e.BookingCheckType=De,e.PersonRole=Te,e.RoleCategory=Me,e.RadioFilterFieldConfig=Pe,e.FeatureToggleGuard=pn,e.FeatureToggleService=X,e.LaunchDarklyService=hn,e.GoogleAnalyticsService=fn,e.GoogleTagManagerService=bn,e.ManageSessionServices=t,e.TimeoutNotificationsService=o,e.RoleMatching=_n,e.RoleGuard=n,e.RoleService=In,e.CookieService=we,e.HasLoadingState=an,e.LoadingService=i,e.FilterService=A,e.windowProvider=Se,e.windowToken=xe,e.ɵx=f,e.ɵz=I,e.ɵf=_,e.ɵbf=Le,e.ɵy=L,e.ɵa=Ye,e.ɵbl=Ve,e.ɵbh=nt,e.ɵbo=it,e.ɵbd=T,e.ɵk=P,e.ɵo=N,e.ɵn=j,e.ɵbc=R,e.ɵbr=ze,e.ɵbk=rt,e.ɵbm=Be,e.ɵbp=lt,e.ɵbq=ut,e.ɵv=W,e.ɵt=$,e.ɵu=J,e.ɵba=Y,e.ɵbb=ee,e.ɵs=ne,e.ɵp=ae,e.ɵw=ce,e.ɵe=de,e.ɵc=ge,e.ɵd=me,e.ɵb=ve,e.ɵm=ye,e.ɵl=Ce,e.ɵq=se,e.ɵg=He,e.ɵi=qe,e.ɵj=Je,e.ɵcb=pt,e.ɵch=ht,e.ɵcg=ft,e.ɵce=bt,e.ɵcf=It,e.ɵcm=_t,e.ɵcc=St,e.ɵca=Et,e.ɵcd=Ft,e.ɵci=Tt,e.ɵcj=Pt,e.ɵck=Nt,e.ɵbz=jt,e.ɵcl=Rt,e.ɵby=Gt,e.ɵbw=Wt,e.ɵbs=$t,e.ɵbx=Jt,e.ɵbt=Yt,e.ɵbv=Xt,e.ɵbu=en,e.ɵcn=nn,e.ɵr=G,e.ɵbg=we,e.ɵh=X,e.ɵbe=A,e.ɵbi=et,e.ɵbn=Oe,e.ɵbj=Ue,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/material/autocomplete"),require("@angular/material/input"),require("@angular/material/tabs"),require("ngx-pagination"),require("@angular/common/http"),require("@angular/forms"),require("launchdarkly-js-client-sdk"),require("@angular/common"),require("@angular/platform-browser"),require("@ng-idle/core"),require("@ng-idle/keepalive"),require("@angular/router"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@hmcts/rpx-xui-common-lib",["exports","@angular/material/autocomplete","@angular/material/input","@angular/material/tabs","ngx-pagination","@angular/common/http","@angular/forms","launchdarkly-js-client-sdk","@angular/common","@angular/platform-browser","@ng-idle/core","@ng-idle/keepalive","@angular/router","@angular/core","rxjs","rxjs/operators"],t):t((e.hmcts=e.hmcts||{},e.hmcts["rpx-xui-common-lib"]={}),e.ng.material.autocomplete,e.ng.material.input,e.ng.material.tabs,e.ngxPagination,e.ng.common.http,e.ng.forms,e.LDClient,e.ng.common,e.ng.platformBrowser,e.i1$1,e.i2$1,e.ng.router,e.ng.core,e.rxjs,e.rxjs.operators)}(this,function(e,t,n,o,i,s,d,r,a,l,c,u,p,g,h,m){"use strict";var f=(v.decorators=[{type:g.Component,args:[{selector:"xuilib-accessibility",template:'<h1 class="govuk-heading-xl" id="Accessibility-statement-for-Expert-UI">Accessibility statement for Expert UI</h1>\n\n<ul class="govuk-list">\n <li><a href="accessibility#immigration">Immigration and Asylum</a></li>\n <li><a href="accessibility#family">Family Public Law </a></li>\n</ul>\n\n<p class="govuk-body">This website is run by HM Courts & Tribunals Service. We want as many people as possible to be\n able to use this website. For example, you should be able to:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>change colours, contrast levels and fonts</li>\n <li>zoom in up to 300% without the text spilling off the screen</li>\n <li>navigate most of the website using just a keyboard</li>\n <li>navigate most of the website using speech recognition software</li>\n <li>listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and\n VoiceOver)\n </li>\n</ul>\n\n<p class="govuk-body">We’ve also made the website text as simple as possible to understand.</p>\n\n<p class="govuk-body"><a rel="noopener noreferrer" target="_blank" href="https://mcmw.abilitynet.org.uk/">AbilityNet</a>\n has advice on making your device easier to use if you have a disability.</p>\n\n<h2 class="govuk-heading-l" id="How-accessible-this-website-is">How accessible this website is</h2>\n\n<p class="govuk-body">We know some parts of the website are not fully accessible:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>some pages are difficult to navigate using just a keyboard</li>\n <li>some pages can’t be listened to in full using a screen reader</li>\n <li>some pages have problems with colour contrasts between text and background</li>\n <li>some PDFs may not be fully accessible to a screen reader</li>\n</ul>\n\n<h2 class="govuk-heading-l" id="What-to-do-if-you-cannot-access-parts-of-this-website">Feedback and contact\n information</h2>\n\n<p class="govuk-body">If you need information on this website in a different format like accessible PDF, large print,\n easy read, audio recording or braille, you can:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>email: <a href="mailto:HMCTSforms@justice.gov.uk"> HMCTSforms@justice.gov.uk</a></li>\n <li>call: +44 (0) 300 123 1711</li>\n <li>contact your service representative</li>\n</ul>\n\n<p class="govuk-body">We’ll consider your request and get back to you in 10 working days.</p>\n\n<h2 class="govuk-heading-l" id="Reporting-accessibility-problems-with-this-website">Reporting accessibility problems\n with this website</h2>\n\n<p class="govuk-body">We’re always looking to improve the accessibility of this website. If you find any problems not\n listed on this page or think we’re not meeting accessibility requirements, contact:</p>\n\n<ul class="govuk-list govuk-list--bullet">\n <li>email: <a href="mailto:customer.service@justice.gov.uk"> customer.service@justice.gov.uk</a></li>\n <li>telephone: +44 (0) 300 123 1711</li>\n</ul>\n\n<h2 class="govuk-heading-l" id="Enforcement-procedure ">Enforcement procedure</h2>\n\n<p class="govuk-body">The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector\n Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the ‘accessibility\n regulations’). </p>\n\n<p class="govuk-body">If you’re not happy with how we respond to your complaint, <a rel="noopener noreferrer"\n target="_blank"\n href="https://www.equalityadvisoryservice.com/">contact\n the Equality Advisory and Support Service (EASS).</a></p>\n\n<h1 class="govuk-heading-l" id="Contacting-us-by-phone-or-visiting-us-in-person">Contacting us by phone or visiting us\n in person</h1>\n\n<p class="govuk-body">We provide a text relay service for people who are D/deaf, hearing impaired or have a speech\n impediment.</p>\n\n<p class="govuk-body">Our offices and tribunal venues have audio induction loops, or if you contact us before your visit\n we can arrange a British Sign Language (BSL) interpreter. You can also request step-free access or a foreign language\n interpreter.</p>\n\n<p class="govuk-body">If you have a question about accessibility in our Tribunal venues, you can contact the First-tier\n Tribunal enquiry line: +44 (0) 300 123 1711. You can <a target="_blank"\n href="https://courttribunalfinder.service.gov.uk/search/">find\n the contact details for court and tribunal venues</a>. </p>\n\n<p class="govuk-body">You can also contact your service representative for more information.</p>\n\n<h1 class="govuk-heading-l" id="Technical-information-about-this-website’s-accessibility">Technical information about\n this website’s accessibility</h1>\n\n<p class="govuk-body">HMCTS is committed to making its website accessible, in accordance with the Public Sector Bodies\n (Websites and Mobile Applications) (No.2) Accessibility Regulations 2018.</p>\n\n<p class="govuk-body">This website is partially compliant with the <a rel="noopener noreferrer" target="_blank"\n href="https://www.w3.org/TR/WCAG21/">Web Content\n Accessibility Guidelines version 2.1</a>, due to the non-compliances listed below.</p>\n\n<h1 class="govuk-heading-l" id="Non-accessible-content">Non-accessible content </h1>\n\n<p class="govuk-body">The content listed below is non-compliant for the following reasons.</p>\n\n<h2 class="govuk-heading-l" id="Non-compliance-with-the-accessibility-regulations">Non-compliance with the accessibility\n regulations</h2>\n\n<p class="govuk-body">Some pages cannot be navigated completely using just a keyboard, so some people won’t be able to\n tab through the pages. This fails WCAG 2.1 success criterion 2.1 (keyboard accessible).</p>\n\n<p class="govuk-body">Some pages can’t be listened to in full using a screen reader, so some people won’t be able to\n access the information. This fails WCAG 2.1 success criterion 1.2.5 (audio description – prerecorded).</p>\n\n<p class="govuk-body">Some of the contrast ratios don’t meet the current accessibility requirements. This fails WCAG 2.1\n success criterion 1.4.3 (contrast – minimum).</p>\n\n<h3 class="govuk-heading-m" id="immigration">Immigration and Asylum</h3>\n\n<p class="govuk-body">Some of the images on the service include text and are not accessible for some low vision users.\n We have identified a solution for this issue that we will implement as soon as possible.</p>\n\n<h3 class="govuk-heading-m" id="family">Family Public Law </h3>\n\n<ol class="govuk-list govuk-list--alpha">\n <li>The navigation system used in family public law cannot be rendered well by screen readers, so features can’t be\n listened to in full\n </li>\n <li>Some essential functions within the family public law digital service cannot be accessed properly using screen\n readers\n </li>\n <li>Some complex forms within the service will not be rendered correctly or cannot be listened to by screen readers\n </li>\n</ol>\n\n<h2 class="govuk-heading-m" id="Disproportionate burden ">Disproportionate burden </h2>\n\n<p class="govuk-body">For Manage organisation, Register organisation, Approve organisations and Manage cases, we found\n the following issues that are currently being triaged to find out if there is a disproportionate burden:</p>\n\n<ol class="govuk-list govuk-list--alpha">\n <li>Screen readers can’t switch between headers, read content in tabs and buttons</li>\n <li>Screen readers can’t tab between radio buttons, read links or content</li>\n <li>Colour contrast ratios uneven between page background and content</li>\n <li>Some labels, fields, error messages and other content can’t be clearly identified by screen readers and voice\n activation software\n </li>\n <li>Some page headings and titles don’t follow a logical structure for screen readers</li>\n <li>The navigation of some pages isn’t clear</li>\n <li>Some headings, links and button labels aren’t clearly descriptive</li>\n</ol>\n\n<h2 class="govuk-heading-m" id="Content-that’s-not-within-the-scope-of-the-accessibility-regulations">Content that’s not\n within the scope of the accessibility regulations </h2>\n\n<p class="govuk-body">PDFs, documents and attachments to email notifications published before 23 September 2018 may not\n meet accessibility standards. For example, they may not be structured so they’re accessible to a screen reader.</p>\n\n<p class="govuk-body">Any new PDFs or Word documents we publish will meet accessibility standards.</p>\n\n<h1 class="govuk-heading-l" id="what-to-improve-accessibility">What we’re doing to improve accessibility</h1>\n\n<p class="govuk-body">We’re committed to ensuring our services are accessible to all our users and that they comply with\n level AA of the Web Content Accessibility Guidelines – WCAG 2.1.</p>\n\n<p class="govuk-body">We’re actively working to improve the identified issues and make them AA-compliant by 23 September\n 2020. We’re also continuing to improve all other AAA-level accessibility issues as we iterate the service.</p>\n\n<h1 class="govuk-heading-l" id="preparation-of-this-accessibility-statement">Preparation of this accessibility\n statement</h1>\n\n<p class="govuk-body">This statement was prepared on 16 September 2019. It was last reviewed on 16 September 2020.</p>\n\n<p class="govuk-body">This website was last tested on 19 May 2020. The test was carried out by the <a target="_blank"\n href="https://digitalaccessibilitycentre.org/">Digital\n Accessibility Centre (DAC)</a>.</p>\n\n<h3 class="govuk-heading-m">Family Private Law:</h3>\n\n<p class="govuk-body">This service has not yet been tested for accessibility issues. In the future, we will conduct an\n accessibility audit in order to find out if there are any accessibility issues. The accessibility statement will be\n updated with any relevant changes that we find.</p>\n\n<p class="govuk-body">If there are any issues with accessing information or using this website please contact:</p>\n\n<ol class="govuk-list govuk-list--bullet">\n <li>Nicola Whitcher - 02380 384324</li>\n <li>Hannah Townley - 02380 384313</li>\n</ol>',styles:[".govuk-list--alpha{padding-left:20px;list-style-type:lower-alpha}"]}]}],v.ctorParameters=function(){return[]},v);function v(){}var b=function(){return(b=Object.assign||function b(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&o>=e.length?void 0:e)&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,s=n.call(e),r=[];try{for(;(void 0===t||0<t--)&&!(o=s.next()).done;)r.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=s["return"])&&n.call(s)}finally{if(i)throw i.error}}return r}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(k(arguments[t]));return e}var I=(Object.defineProperty(w.prototype,"selection",{get:function(){return this.pSelection?C(this.pSelection):[]},set:function(e){this.pSelection=this.getSelection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"allSelected",{get:function(){return this.selection.length===this.options.length},enumerable:!0,configurable:!0}),w.prototype.ngOnChanges=function(){this.setupPreselection(),this.checkSelection()},Object.defineProperty(w.prototype,"hasOptions",{get:function(){return this.options&&0<this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"isFunctional",{get:function(){return this.labelFunction&&this.hasOptions},enumerable:!0,configurable:!0}),w.prototype.isSelected=function(e){return this.selection.includes(e)},w.prototype.toggleItemSelection=function(e){this.pSelection===undefined?this.pSelection=[e]:this.isSelected(e)?this.pSelection.splice(this.pSelection.indexOf(e),1):this.pSelection.push(e),this.pSelectionMade=!0,this.selectionChange.emit(this.selection)},w.prototype.toggleSelectAll=function(){this.allSelected?this.pSelection=[]:this.pSelection=C(this.options),this.pSelectionMade=!0,this.selectionChange.emit(this.pSelection)},w.prototype.containsItem=function(e,t){var n=this;if(this.isFunctional){var o=this.labelFunction(t);return e.some(function(e){return n.labelFunction(e)===o})}return!1},Object.defineProperty(w.prototype,"hasPreselection",{get:function(){return this.preselection&&0<this.preselection.length},enumerable:!0,configurable:!0}),w.prototype.setupPreselection=function(){var e,t=this;this.isFunctional&&!this.pSelectionMade&&this.hasPreselection&&(e=!0,(e=this.pSelection?0<this.pSelection.filter(function(e){return!t.containsItem(t.preselection,e)}).length:e)&&(this.pSelection=this.getSelection(this.preselection),this.selectionChange.emit(this.selection)))},w.prototype.getSelection=function(t){var n=this;return C(this.options.filter(function(e){return n.containsItem(t,e)}))},w.prototype.checkSelection=function(){var e,t=this;!this.isFunctional||(e=this.selection.filter(function(e){return t.containsItem(t.options,e)})).length!==this.selection.length&&(this.pSelection=C(e),this.selectionChange.emit(this.selection))},w.decorators=[{type:g.Component,args:[{selector:"xuilib-checkbox-list",template:'<div class="xui-checkbox-list govuk-checkboxes govuk-checkboxes--small" *ngIf="isFunctional">\n <div class="select-all govuk-checkboxes__item">\n <input type="checkbox" id="select_all" class="govuk-checkboxes__input" [checked]="allSelected"\n (change)="toggleSelectAll()" />\n <label for="select_all" class="govuk-label govuk-checkboxes__label">Select all / Deselect all</label>\n </div>\n <div class="checkbox-items">\n <div *ngFor="let item of options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" [id]="\'select_\' + i" class="govuk-checkboxes__input" [checked]="isSelected(item)"\n (change)="toggleItemSelection(item)" />\n <label [for]="\'select_\' + i" class="govuk-label govuk-checkboxes__label">{{labelFunction(item)}}</label>\n </div>\n </div>\n</div>\n',encapsulation:g.ViewEncapsulation.None,styles:[".xui-checkbox-list .select-all{margin-bottom:10px}.xui-checkbox-list .checkbox-items{display:flex;flex-direction:column;flex-wrap:wrap;height:100%;max-height:100%;align-items:flex-start;align-content:flex-start;width:100%;max-width:100%;overflow-x:scroll}"]}]}],w.propDecorators={options:[{type:g.Input}],preselection:[{type:g.Input}],labelFunction:[{type:g.Input}],selectionChange:[{type:g.Output}],selection:[{type:g.Input}]},w);function w(){this.options=[],this.selectionChange=new g.EventEmitter}var x=(_.decorators=[{type:g.Component,args:[{selector:"xuilib-contact-details",template:'<div class="contact-details" *ngIf="data">\n <h3 class="govuk-heading-m" *ngIf="data.title">{{ data.title }}</h3>\n <p *ngIf="data.badgeText"><span [className]="\'hmcts-badge \' + data.badgeColour">{{ data.badgeText }}</span></p>\n <div class="email" *ngIf="data.email"><span class="govuk-!-font-weight-bold">Email: </span> <a href="mailto:{{ data.email }}">{{ data.email }}</a></div>\n <div class="phone" *ngIf="data.phone"><span class="govuk-!-font-weight-bold">Phone: </span>{{ data.phone }}</div>\n <div class="opening-times" *ngIf="data.openingTimes"><span class="govuk-!-font-weight-bold">Opening times: </span>{{ data.openingTimes}}</div>\n</div>\n\n',styles:[".contact-details{margin-top:30px}.contact-details h3,.contact-details p{margin-bottom:10px}"]}]}],_.ctorParameters=function(){return[]},_.propDecorators={data:[{type:g.Input}]},_);function _(){}var S={RED:"hmcts-badge--red",ORANGE:"hmcts-badge--orange",GREEN:"hmcts-badge--green"},L=(Object.defineProperty(T.prototype,"badge",{get:function(){return this.pBadge},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"label",{get:function(){return this.pLabel},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"accessibleLabel",{get:function(){return this.pAccessibleLabel},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,"daysDiff",{get:function(){return this.pDaysDiff},enumerable:!0,configurable:!0}),T.prototype.ngOnChanges=function(){this.handleInputChanges()},T.prototype.handleInputChanges=function(){var e;this.dueDate&&(this.pDaysDiff=this.getDaysDifference(this.dueDate,new Date),0<this.daysDiff?(this.pBadge=S.RED,e=1===this.daysDiff?"day":"days",this.pLabel="+"+this.daysDiff+" "+e,this.pAccessibleLabel="This task is "+this.daysDiff+" "+e+" past its due date"):(0===this.daysDiff?(this.pLabel="TODAY",this.pAccessibleLabel="This task is due to be completed today"):(this.pLabel=""+a.formatDate(this.dueDate,"d MMM","en-GB"),this.pAccessibleLabel="This task is due to be completed by "+a.formatDate(this.dueDate,"d MMMM y","en-GB")),0<this.daysDiff+this.highUrgencyCutoff?this.pBadge=S.RED:0<this.daysDiff+this.mediumUrgencyCutoff?this.pBadge=S.ORANGE:this.pBadge=S.GREEN))},T.prototype.getDaysDifference=function(e,t){e=e.getTime(),t=t.getTime(),e=Math.floor((t-e)/1e3);return Math.floor(e/86400)},T.decorators=[{type:g.Component,args:[{selector:"xuilib-due-date",template:'<span *ngIf="dueDate" class="due-date hmcts-badge" [ngClass]="badge"\n [title]="accessibleLabel" [attr.aria-label]="accessibleLabel">\n {{label}}\n</span>',encapsulation:g.ViewEncapsulation.None,styles:[".due-date{white-space:nowrap}.due-date.hmcts-badge--orange{color:#f47738;border-color:#f47738}"]}]}],T.propDecorators={dueDate:[{type:g.Input}],highUrgencyCutoff:[{type:g.Input}],mediumUrgencyCutoff:[{type:g.Input}]},T);function T(){this.highUrgencyCutoff=0,this.mediumUrgencyCutoff=2}var E=(F.prototype.persist=function(e,t){switch(t){case"local":this.persistLocal(e);break;case"session":this.persistSession(e)}this.persistMemory(e),this.updateStreams(e)},F.prototype.get=function(e){return this.filterSettings[e]||(sessionStorage.getItem(e)?JSON.parse(sessionStorage.getItem(e)):localStorage.getItem(e)&&this.isSameUser(e)?JSON.parse(window.localStorage.getItem(e)):null)},F.prototype.isSameUser=function(e){e=JSON.parse(window.localStorage.getItem(e));return!!e.idamId&&e.idamId===this.getUserId()},F.prototype.getStream=function(e){return this.streams[e]||(this.streams[e]=new h.BehaviorSubject(this.get(e))),this.streams[e].asObservable()},F.prototype.clearSessionAndLocalPersistance=function(e){sessionStorage.removeItem(e),localStorage.removeItem(e),this.filterSettings[e]!==undefined&&(this.filterSettings[e]=null),this.streams[e]!==undefined&&this.streams[e].next(null)},F.prototype.persistLocal=function(e){e.idamId=this.getUserId(),window.localStorage.setItem(e.id,JSON.stringify(e))},F.prototype.persistSession=function(e){sessionStorage.setItem(e.id,JSON.stringify(e))},F.prototype.persistMemory=function(e){this.filterSettings[e.id]=e},F.prototype.updateStreams=function(e){this.streams[e.id]&&this.streams[e.id].next(e)},F.prototype.getUserId=function(){var e,t=window.sessionStorage.getItem("userDetails");return e=t?(t=JSON.parse(t)).id||t.uid:e},F.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],F.ngInjectableDef=g.defineInjectable({factory:function(){return new F},token:F,providedIn:"root"}),F);function F(){this.givenErrors=new h.BehaviorSubject(null),this.isInitialSetting=!1,this.filterSettings={},this.streams={}}function A(e,o){return e.reduce(function(e,t,n){return o[n]?C(e,[t.key]):e},[])}var N=(Object.defineProperty(D.prototype,"config",{get:function(){return this._config},set:function(e){this._config=b({},e,{fields:e.fields.map(function(e){return b({},e,{displayMinSelectedError:!1,displayMaxSelectedError:!1})})}),this._config=e},enumerable:!0,configurable:!0}),Object.defineProperty(D.prototype,"settings",{get:function(){return this._settings},set:function(e){e||this.getSettings(),e&&e.fields&&this.mergeDefaultFields(e),this._settings=e},enumerable:!0,configurable:!0}),D.addFormValidators=function(e){var t,n,o=[];return e&&0<e.minSelected&&o.push((t=e.minSelected,function(e){e=e.value;return e.length&&e.filter(function(e){return e}).length>=t?null:{minlength:!0}})),e&&0<e.maxSelected&&o.push((n=e.maxSelected,function(e){e=e.value;return e.length&&e.filter(function(e){return e}).length<=n?null:{maxLength:!0}})),o},D.prototype.ngOnInit=function(){var e=this;this.settings||this.getSettings(),this.mergeDefaultFields(this.settings),this.buildForm(this.config,this.settings),this.formSub=this.form.valueChanges.subscribe(function(){return e.submitted=!1}),this.filterSkillsByServices(null,this.config);var t=this.config.fields.find(function(e){return"user-services"===e.name});t&&(this.startFilterSkillsByServices(this.form,t),this.initValuesFromCacheForSkillsByServices())},D.prototype.ngOnDestroy=function(){this.formSub&&this.formSub.unsubscribe()},D.prototype.hidden=function(e,t){if(!e.showCondition)return!1;if("string"==typeof e.showCondition){var n=t.get(e.name),o=k(e.showCondition.split("="),2),i=o[0],o=o[1];if(t.value&&t.value[i]===o)return"find-person"===e.type?(n.get("email").setValidators(d.Validators.required),n.get("email").updateValueAndValidity()):(n.setValidators(d.Validators.required),n.updateValueAndValidity()),!1;"find-person"===e.type?(n.get("email").clearValidators(),n.get("email").updateValueAndValidity()):(n.clearValidators(),n.updateValueAndValidity())}return!0},D.prototype.disabled=function(e,t){if(!e.enableCondition)return null;if("string"==typeof e.enableCondition){var n=t.get(e.name),o=k(e.enableCondition.split("="),2),i=o[0],o=o[1];if(t.value&&t.value[i]===o)return"find-person"===e.type?(n.get("email").setValidators(d.Validators.required),n.get("email").updateValueAndValidity()):(n.setValidators(d.Validators.required),n.updateValueAndValidity()),null;"find-person"===e.type?(n.get("email").clearValidators(),n.get("email").updateValueAndValidity()):(n.clearValidators(),n.updateValueAndValidity())}return"find-location"===e.type||(e.disable||null)},D.prototype.applyFilter=function(e){var t;this.submitted=!0,e.markAsTouched(),e.valid?(this._settings={id:this.config.id,idamId:this.filterService.getUserId(),fields:this.getSelectedValues(e.value,this.config)},this.filterService.givenErrors.next(null),t=b({},this.settings,{reset:!1}),this.filterService.persist(t,this.config.persistence)):this.emitFormErrors(e)},D.prototype.fieldChanged=function(e,t){var n,o;if(e.changeResetFields&&e.changeResetFields.length)try{for(var i=y(e.changeResetFields),s=i.next();!s.done;s=i.next()){var r=s.value;this.resetField(r,t)}}catch(a){n={error:a}}finally{try{s&&!s.done&&(o=i["return"])&&o.call(i)}finally{if(n)throw n.error}}},D.prototype.inputChanged=function(e){var t;"user-services"===e.name&&(t=this.getSelectedValuesForFields(this.form.controls,e),this.filterSkillsByServices(t,this.config)),e.radioSelectionChange&&"string"==typeof e.radioSelectionChange&&(e=(t=k(e.enableCondition.split("="),2))[0],t=t[1],this.form.get(e).patchValue(t))},D.prototype.cancelFilter=function(){this.buildForm(this.config,this.settings,!0),this.config&&this.config.cancelSetting&&(this._settings.fields=JSON.parse(JSON.stringify(this.config.cancelSetting.fields)));var e=b({},this.settings,{reset:!0});this.filterService.persist(e,this.config.persistence),this.filterService.givenErrors.next(null),this.submitted=!1,this.config.cancelButtonCallback&&this.config.cancelButtonCallback()},D.prototype.updatePersonControls=function(e,t){var n,o,i=e?Object.keys(e):Object.keys(this.form.get(t.name).value);try{for(var s=y(i),r=s.next();!r.done;r=s.next()){var a,l=r.value;this.form.get(t.name)&&this.form.get(t.name).get(l)&&(a=e&&e[l]?e[l]:null,this.form.get(t.name).get(l).patchValue(a))}}catch(c){n={error:c}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}},D.prototype.checkBoxChecked=function(e,t){return this.form.get(e.name).controls[t].value},D.prototype.updateTaskNameControls=function(e,t){this.form.get(t.name).patchValue(e)},D.prototype.toggleSelectAll=function(t,e,n,o){var i,s,r,a,l,c,u=t.target.checked,d=e.get(o.name);if(n.selectAll?d.controls.forEach(function(e){u?e.patchValue(!0):e.patchValue(!1)}):(r=d.controls.every(function(e){return e.value}),a=null,l=o.options.find(function(e,t){return!!e.hasOwnProperty("selectAll")&&(a=t,!0)}),n=d.controls.filter(function(e,t){return t!==a}).every(function(e){return e.value}),r||!l||u?l&&!r&&u&&n&&d.controls[a].patchValue(!0):d.controls.forEach(function(e,t){a===t&&e.patchValue(!1)})),o.changeResetFields&&o.changeResetFields.length)try{for(var p=y(o.changeResetFields),g=p.next();!g.done;g=p.next()){var h=g.value;this.resetField(h,e)}}catch(m){i={error:m}}finally{try{g&&!g.done&&(s=p["return"])&&s.call(p)}finally{if(i)throw i.error}}"user-services"===o.name?this.startFilterSkillsByServices(e,o):"user-skills"===o.name&&(u?(o=o.options.findIndex(function(e){return Number(e.key)===Number(t.target.value)}),(c=this.form.get("user-skills").value)[o]=!0,this.form.get("user-skills").setValue(c),this.previousSelectedNestedCheckbox.push(t.target.value)):-1!==(c=this.previousSelectedNestedCheckbox.indexOf(t.target.value))&&this.previousSelectedNestedCheckbox.splice(c,1))},D.prototype.startFilterSkillsByServices=function(e,n){var o=[];e.value[n.name].map(function(e,t){e&&o.push(n.options[t].key)}),this.filterSkillsByServices(o,this.config)},D.prototype.resetField=function(t,e){var n,o,i=e.get(t),s=this.config.cancelSetting.fields.find(function(e){return e.name===t});if(i instanceof d.FormArray)for(var r=0;r<i.length;r++)i.removeAt(r);else if(i instanceof d.FormGroup){e=Object.keys(i.value);try{for(var a=y(e),l=a.next();!l.done;l=a.next()){var c=l.value;this.resetField(c,i)}}catch(u){n={error:u}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}}else i instanceof d.FormControl&&(s=s&&s.value&&s.value.length?s.value[0]:null,i.setValue(s))},D.prototype.mergeDefaultFields=function(e){e?e.fields=(this.filterService.get(this.config.id)?this.filterService.get(this.config.id):e).fields:this.config&&this.config.cancelSetting&&(this._settings={id:this.config.id,fields:JSON.parse(JSON.stringify(this.config.cancelSetting.fields))})},D.prototype.getSettings=function(){this._settings=this.filterService.get(this.config.id)},D.prototype.buildForm=function(s,r,a){var e,t,n=this.form?this.form.get("findPersonControl"):null;this.form=this.fb.group({}),n&&this.form.addControl("findPersonControl",n);var l=this;try{for(var o=y(s.fields),i=o.next();!i.done;i=o.next())!function(t){var e,n,o,i;"checkbox"===t.type||"checkbox-large"===t.type||"nested-checkbox"===t.type?(e=l.buildCheckBoxFormArray(t,r),l.form.addControl(t.name,e)):"find-location"===t.type||"find-service"===t.type?(e=l.buildFormArray(t,r),l.form.addControl(t.name,e)):(i=[],t.minSelected&&0<t.minSelected&&(i.push(d.Validators.required),"text-input"===t.type&&i.push(d.Validators.minLength(t.minSelected)),"email-input"===t.type&&i.push(d.Validators.email)),n=null,a&&s.cancelSetting?n=(e=s.cancelSetting.fields.find(function(e){return e.name===t.name}))&&e.value?e.value[0]:"":r&&r.fields&&(n=(o=r.fields.find(function(e){return e.name===t.name}))&&o?o.value[0]:""),"find-person"===t.type?(o=new d.FormGroup({domain:new d.FormControl(n&&n.hasOwnProperty("domain")?n.domain:""),email:new d.FormControl(n&&n.hasOwnProperty("email")?n.email:"",i),id:new d.FormControl(n&&n.hasOwnProperty("id")?n.id:""),name:new d.FormControl(n&&n.hasOwnProperty("name")?n.name:""),knownAs:new d.FormControl(n&&n.hasOwnProperty("knownAs")?n.knownAs:"")}),l.form.addControl(t.name,o)):"group-title"!==t.type&&(i=new d.FormControl(n,i),l.form.addControl(t.name,i)),t.findPersonField&&l.fieldChanged(t,l.form))}(i.value)}catch(c){e={error:c}}finally{try{i&&!i.done&&(t=o["return"])&&t.call(o)}finally{if(e)throw e.error}}},D.prototype.buildCheckBoxFormArray=function(t,e){var n,o,i,s=D.addFormValidators(t),r=this.fb.array([],s);e&&e.fields&&(i=e.fields.find(function(e){return e.name===t.name}));try{for(var a=y(t.options),l=a.next();!l.done;l=a.next())!function(t){var e=!1;i&&Array.isArray(i.value)&&(e=!!i.value.find(function(e){return e===t.key})),r.push(new d.FormControl(e))}(l.value)}catch(c){n={error:c}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return r},D.prototype.buildFormArray=function(t,e){var n,o,i,s=D.addFormValidators(t),r=this.fb.array([],s);if(e&&e.fields&&(i=e.fields.find(function(e){return e.name===t.name}))&&i.value&&0<i.value.length)try{for(var a=y(i.value),l=a.next();!l.done;l=a.next()){var c=l.value;r.push(new d.FormControl(c))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(o=a["return"])&&o.call(a)}finally{if(n)throw n.error}}return r},D.prototype.getSelectedValues=function(o,i){return Object.keys(o).map(function(t){var e=o[t];if(Array.isArray(e)){var n=i.fields.find(function(e){return e.name===t});return"find-location"===n.type||"find-service"===n.type?{value:e,name:t}:{value:A(n.options,e),name:t}}return{value:[e],name:t}})},D.prototype.emitFormErrors=function(e){var t,n,o=[];try{for(var i=y(this.config.fields),s=i.next();!s.done;s=i.next()){var r=s.value,a=e.get(r.name);a&&a.errors&&(a.errors.minlength||a.errors.required)&&o.push({name:r.name,error:r.minSelectedError}),a&&a.errors&&a.errors.maxlength&&o.push({name:r.name,error:r.maxSelectedError})}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}(o=o.filter(function(t,e,n){return o.indexOf(n.find(function(e){return e.name===t.name}))===e})).length&&this.filterService.givenErrors.next(o)},D.prototype.initValuesFromCacheForSkillsByServices=function(){var o=this,e=this.filteredSkillsByServicesCheckbox.map(function(t){var e,n=!1;return o.settings&&o.settings.fields&&((e=o.settings.fields.find(function(e){return"user-skills"===e.name}))&&e.value&&0<e.value.length&&(n=-1!==e.value.findIndex(function(e){return String(e)===String(t.key)}))),n});this.form.get("user-skills").setValue(e)},D.prototype.filterSkillsByServices=function(e,t){var o=this;this.filteredSkillsByServices=[],this.filteredSkillsByServicesCheckbox=[];var n=t.fields.find(function(e){return"user-skills"===e.name&&"group-select"===e.type}),t=t.fields.find(function(e){return"user-skills"===e.name&&"nested-checkbox"===e.type});if(n){var i=n.groupOptions;e&&0!==e.length?e.forEach(function(t){var e=i.find(function(e){return e.group.toLowerCase()===t.toLowerCase()});e&&o.filteredSkillsByServices.push(e)}):this.filteredSkillsByServices=i}else if(t){var s=t.groupOptions;if(e&&0!==e.length){e.forEach(function(t){var e=s.find(function(e){return e.group.toLowerCase()===t.toLowerCase()});e&&o.filteredSkillsByServices.push(e)}),this.filteredSkillsByServicesCheckbox=this.filteredSkillsByServices.map(function(e){return e.options}).reduce(function(e,t){return e.concat(t)},[]),t.options=[],t.options=this.filteredSkillsByServicesCheckbox,this.form.setControl("user-skills",new d.FormArray([])),this.filteredSkillsByServicesCheckbox.forEach(function(){o.form.get("user-skills").push(new d.FormControl(!1))});t=this.filteredSkillsByServicesCheckbox.map(function(t){var e,n=!1;return o.settings&&o.settings.fields&&(0<o.previousSelectedNestedCheckbox.length&&(n=o.previousSelectedNestedCheckbox.includes(t.key)),(e=o.settings.fields.find(function(e){return"user-skills"===e.name}))&&e.value&&0<e.value.length&&(n=-1!==e.value.findIndex(function(e){return Number(e)===Number(t.key)})),0<o.previousSelectedNestedCheckbox.length&&(n=o.previousSelectedNestedCheckbox.includes(String(t.key)))),n});return this.form.get("user-skills").setValue(t),this.filteredSkillsByServicesCheckbox}this.filteredSkillsByServices=s}return this.filteredSkillsByServices=this.sortGroupOptions(this.filteredSkillsByServices),this.filteredSkillsByServices},D.prototype.getSelectedValuesForFields=function(n,o){var i=[];return Object.keys(n).map(function(e){var t=n[e].value;e===o.name&&t.forEach(function(e){i.push(e.key)})}),i},D.prototype.sortGroupOptions=function(n){var o=[];return n.map(function(e){return e.group}).sort().forEach(function(t){var e=n.find(function(e){return e.group===t}).options.sort(function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:t.label.toLowerCase()>e.label.toLowerCase()?-1:0});o.push({group:t,options:e})}),o},D.decorators=[{type:g.Component,args:[{selector:"xuilib-generic-filter",template:'<form [formGroup]="form" (ngSubmit)="applyFilter(form)">\n <div class="contain-classes" *ngFor="let field of config.fields">\n <hr *ngIf="field.lineBreakBefore" class="govuk-section-break govuk-section-break--visible elevated-break">\n <ng-container [ngSwitch]="field.type">\n <ng-container *ngSwitchCase="\'group-title\'">\n <div [class]="field.titleClasses ? field.titleClasses: \'govuk-label govuk-label--m govuk-!-margin-bottom-4\'">\n {{ field.name | capitalize }}\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class="govuk-form-group xui-generic-filter"\n [hidden]="hidden(field, form)"\n [id]="field.name"\n [ngClass]="{\'form-group-error\': submitted && (form.get(field.name).errors?.minLength || form.get(field.name).errors?.maxLength)}">\n <div *ngIf="field.title" class="xui-generic-filter__field-title">\n <h3 [class]="field.titleClasses ? field.titleClasses : \'govuk-heading-s\'" style="margin-bottom: 0!important">\n {{field.title | capitalize}}\n </h3>\n <div *ngIf="field?.titleHint" class="govuk-!-margin-left-2">\n {{ field.titleHint }}\n </div>\n </div>\n <p class="govuk-body" *ngIf="field.subTitle">{{field.subTitle}}</p>\n <span [id]="field.name + \'-error\'" class="govuk-error-message" *ngIf="field.displayMinSelectedError && submitted && form.get(field.name).errors?.minLength">\n <span class="govuk-visually-hidden">Error:</span> {{field.minSelectedError}}\n </span>\n <span [id]="field.name + \'-error\'" class="govuk-error-message" *ngIf="field.displayMaxSelectedError && submitted && form.get(field.name).errors?.maxLength">\n <span class="govuk-visually-hidden">Error:</span> {{field.maxSelectedError}}\n </span>\n <span [id]="field.name + \'-error\'" class="govuk-error-message"\n *ngIf="field.emailError && submitted && form.get(field.name).errors?.email">\n <span class="govuk-visually-hidden">Error:</span> {{field.emailError}}\n </span>\n <div class="govuk-body" [class.govuk-body--maxWidth480px]="field.maxWidth480px" [ngSwitch]="field.type">\n <ng-container *ngSwitchCase="\'select\'">\n <select class="govuk-select" (change)="fieldChanged(field, form)" [attr.disabled]="disabled(field, form)" [name]="\'select_\' + field.name" [id]="\'select_\' + field.name" [formControlName]="field.name">\n <option disabled selected hidden value="">{{field.disabledText}}</option>\n <option *ngIf="field.defaultOption" [attr.selected]="true" [value]="field.defaultOption.key">{{field.defaultOption.label}}</option>\n <option class="govuk-radios__item" *ngFor="let item of field.options" [value]="item.key">{{item.label}}</option>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase="\'group-select\'">\n <select class="govuk-select" (change)="fieldChanged(field, form)" [attr.disabled]="disabled(field, form)" [name]="\'select_\' + field.name" [id]="\'select_\' + field.name" [formControlName]="field.name">\n <option disabled selected hidden value="">{{field.disabledText}}</option>\n <option *ngIf="field.defaultOption" selected [value]="field.defaultOption.key">{{field.defaultOption.label}}</option>\n <optgroup *ngFor = \'let grp of filteredSkillsByServices\' label="{{grp.group | titlecase}}">\n <option *ngFor = \'let item of grp.options\' [value]="item.key">{{item.label}}</option>\n </optgroup>\n </select>\n </ng-container>\n <ng-container *ngSwitchCase="\'checkbox\'">\n <div class="govuk-checkboxes govuk-checkboxes--small" [formGroupName]="field.name" [attr.field]="field.name" [id]="\'checkbox_\' + field.name">\n <div *ngFor="let item of field.options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" class="govuk-checkboxes__input"\n [attr.disabled]="disabled(field, form)"\n [formControlName]="i"\n (change)="toggleSelectAll($event, form, item, field)"\n [value]="item.key" [id]="\'checkbox_\' + item.key"\n [name]="\'checkbox_\' + item.key"\n />\n <label\n [for]="\'checkbox_\' + item.key"\n class="govuk-label govuk-checkboxes__label"\n [ngClass]="{\'govuk-!-font-weight-bold\': item.selectAll}"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'nested-checkbox\'">\n <div class="govuk-checkboxes govuk-checkboxes--small" [formGroupName]="field.name" [attr.field]="field.name" [id]="\'checkbox_\' + field.name">\n <div *ngFor="let item of filteredSkillsByServicesCheckbox; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" class="govuk-checkboxes__input"\n [attr.disabled]="disabled(field, form)"\n [formControlName]="i"\n (change)="toggleSelectAll($event, form, item, field)"\n [value]="item.key" [id]="\'checkbox_\' + item.key"\n [name]="\'checkbox_\' + item.key"\n />\n <label\n [for]="\'checkbox_\' + item.key"\n class="govuk-label govuk-checkboxes__label"\n [ngClass]="{\'govuk-!-font-weight-bold\': item.selectAll}"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'checkbox-large\'">\n <div class="govuk-checkboxes" [formGroupName]="field.name" [attr.field]="field.name" [id]="\'checkbox_\' + field.name">\n <div *ngFor="let item of field.options; let i = index" class="govuk-checkboxes__item">\n <input type="checkbox" class="govuk-checkboxes__input"\n [attr.disabled]="disabled(field, form)"\n [formControlName]="i"\n (change)="toggleSelectAll($event, form, item, field)"\n [value]="item.key" [id]="\'checkbox_\' + item.key"\n [name]="\'checkbox_\' + item.key"\n />\n <label\n [for]="\'checkbox_\' + item.key"\n class="govuk-label govuk-checkboxes__label"\n [ngClass]="{\'govuk-!-font-weight-bold\': item.selectAll}"\n >{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'radio\'">\n <div class="govuk-radios">\n <div *ngFor="let item of field.options" class="govuk-radios__item">\n <input type="radio"\n [formControlName]="field.name"\n [id]="\'radio_\' + item.key"\n [attr.disabled]="disabled(field, form)"\n [checked]="item.key === form.get(field.name).value"\n class="govuk-radios__input"\n [value]="item.key"\n (change)="fieldChanged(field, form)"\n />\n <label [for]="\'radio_\' + item.key" class="govuk-label govuk-radios__label">{{item.label}}</label>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-person\'">\n <xuilib-find-person subTitle="" (personSelected)="updatePersonControls($event, field)"\n (personFieldChanged)="inputChanged(field)"\n [submitted]="submitted"\n [disabled]="disabled(field, form)"\n [domain]="form.get(field.domainField)?.value"\n [findPersonGroup]="form"\n [selectedPerson]="form.get(field.name)?.value?.email"\n [userIncluded]="false"\n [placeholderContent]="field.placeholderContent ? field.placeholderContent : \'\'"\n ></xuilib-find-person>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-location\'">\n <xuilib-find-location (locationFieldChanged)="inputChanged(field)"\n [form]="form"\n [fields]="config.fields"\n [locationTitle]="field.locationTitle"\n [enableAddLocationButton]="field.enableAddButton"\n [disabled]="disabled(field, form)"\n [disableInputField]="field.disable"\n [selectedLocations]="form.get(field.name)?.value"\n [submitted]="submitted"\n [services]="form.get(field.findLocationField)?.value"\n [field]="field"\n ></xuilib-find-location>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-task-name\'">\n <xuilib-find-task-name subTitle="" (taskNameSelected)="updateTaskNameControls($event, field)"\n (taskNameFieldChanged)="inputChanged(field)"\n [submitted]="submitted"\n [disabled]="disabled(field, form)"\n [domain]="form.get(field.domainField)?.value"\n [findTaskNameGroup]="form"\n [selectedTaskName]="form.get(field.name).value.taskName"\n [userIncluded]="false"\n ></xuilib-find-task-name>\n </ng-container>\n <ng-container *ngSwitchCase="\'find-service\'">\n <xuilib-find-service (serviceFieldChanged)="inputChanged(field)"\n [form]="form"\n [fields]="config.fields"\n [title]="field.title"\n [enableAddServiceButton]="field.enableAddButton"\n [disabled]="disabled(field, form)"\n [disableInputField]="field.disable"\n [selectedServices]="form.get(field.name)?.value"\n [services]="field.options"\n [field]="field"\n ></xuilib-find-service>\n </ng-container>\n <ng-container *ngSwitchCase="\'text-input\'">\n <input class="govuk-input" type="text"\n [formControlName]="field.name"\n [id]="field.name"\n [attr.disabled]="disabled(field, form)"\n (change)="fieldChanged(field, form)"\n [attr.maxlength]="field.maxlength ? field.maxlength : null"\n />\n </ng-container>\n <ng-container *ngSwitchCase="\'email-input\'">\n <input class="govuk-input" type="email"\n [formControlName]="field.name"\n [id]="field.name"\n [attr.disabled]="disabled(field, form)"\n (change)="fieldChanged(field, form)"\n />\n </ng-container>\n </div>\n </div>\n </ng-container>\n</ng-container>\n </div>\n <hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible"/>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-full">\n <button\n class="govuk-button govuk-!-margin-right-1 govuk-!-margin-bottom-0"\n type="submit"\n id="applyFilter"\n [disabled]="config.enableDisabledButton && form.invalid"\n >{{config.applyButtonText || \'Apply\'}}</button>\n <button *ngIf="config.showCancelFilterButton"\n class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0"\n type="button"\n id="cancelFilter"\n (click)="cancelFilter()">{{ config.cancelButtonText || \'Cancel\'}}</button>\n </div>\n </div>\n</form>\n',changeDetection:g.ChangeDetectionStrategy.OnPush,encapsulation:g.ViewEncapsulation.None,styles:[".contain-classes .elevated-break{margin-bottom:20px}@media (min-width:40.0625em){.contain-classes .elevated-break{margin-bottom:30px}}.contain-classes .govuk-body--maxWidth480px{max-width:480px}.contain-classes .xui-generic-filter .select-all{margin-bottom:10px}.contain-classes .xui-generic-filter .govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap}.contain-classes .xui-generic-filter .govuk-checkboxes>div{flex-grow:1;flex-shrink:0}.contain-classes .xui-generic-filter__field-title{display:flex;align-items:center;margin-bottom:10px}.contain-classes .govuk-select{width:100%}"]}]}],D.ctorParameters=function(){return[{type:E},{type:d.FormBuilder}]},D.propDecorators={config:[{type:g.Input}],settings:[{type:g.Input}]},D);function D(e,t){this.filterService=e,this.fb=t,this.submitted=!1,this.previousSelectedNestedCheckbox=[]}var O=(M.prototype.onClose=function(){this.close.emit()},M.decorators=[{type:g.Component,args:[{selector:"xuilib-session-dialog",template:'<div class="gem-c-modal-dialogue" data-module="modal-dialogue" id="modal-default" style="display: block;">\n <div class="gem-c-modal-dialogue__overlay"></div>\n <dialog class="gem-c-modal-dialogue__box" aria-modal="true" role="dialog" tabindex="0" [ngStyle]="{\'margin-top\': positionTop}">\n <div class="gem-c-modal-dialogue__header">\n <svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" height="33" width="33">\n <style type="text/css">\n .st0{fill:#FFFFFF;}\n </style>\n <g id="_4_-_granular_components_warning_icon" transform="translate(0.5 0.5)">\n <g id="Warning_icon" transform="translate(0)">\n <path id="Exclusion_1" class="st0" d="M18.5,37.5c-5.04,0.01-9.88-1.99-13.44-5.57C1.49,28.38-0.51,23.54-0.5,18.5\n c-0.01-5.04,1.99-9.88,5.56-13.43C8.62,1.49,13.46-0.51,18.5-0.5c5.04-0.01,9.88,1.99,13.44,5.56c3.57,3.56,5.58,8.39,5.56,13.44\n c0.01,5.04-1.99,9.88-5.56,13.44C28.38,35.51,23.54,37.51,18.5,37.5z M18.52,24.29c-0.4,0-0.8,0.08-1.17,0.23\n c-0.36,0.15-0.69,0.37-0.97,0.64c-0.28,0.27-0.5,0.59-0.65,0.95c-0.16,0.36-0.24,0.76-0.23,1.15c0,0.4,0.08,0.8,0.23,1.17\n c0.15,0.36,0.37,0.68,0.65,0.96c0.28,0.27,0.61,0.49,0.97,0.64c0.37,0.16,0.77,0.24,1.17,0.24c0.4,0,0.79-0.08,1.15-0.24\n c0.35-0.15,0.67-0.37,0.95-0.64c0.27-0.27,0.49-0.6,0.64-0.96c0.16-0.37,0.24-0.77,0.23-1.17c0-0.4-0.08-0.79-0.23-1.15\n c-0.15-0.35-0.37-0.67-0.64-0.95c-0.27-0.27-0.6-0.49-0.95-0.64C19.31,24.37,18.92,24.29,18.52,24.29L18.52,24.29z M16.11,7.5\n l0.42,14.87h3.91L20.86,7.5H16.11z"/>\n </g>\n </g>\n </svg>\n <div class="gem-c-modal-dialogue__title">We are about to sign you out</div>\n </div>\n <div class="gem-c-modal-dialogue__content">\n <ng-content></ng-content>\n </div>\n </dialog>\n</div>\n',styles:['.gem-c-modal-dialogue{display:none;position:fixed;z-index:1000;top:0;left:0;width:100%;height:100%;overflow-x:hidden;overflow-y:scroll;outline:0}.gem-c-modal-dialogue__box{display:block;position:fixed;background:#fff;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;padding:0;overflow-y:auto;border:0;font-family:"GDS Transport",Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:1rem;line-height:1.25;color:#0b0c0c}.gem-c-modal-dialogue__box:focus{outline:#fd0 solid 3px}@media (min-width:40.0625em){.gem-c-modal-dialogue__box{font-size:1.1875rem;line-height:1.3157894737;position:relative;top:inherit;right:inherit;bottom:inherit;left:inherit;width:auto;max-width:640px;height:auto;margin:30px auto;border:2px solid #0b0c0c}}@media print{.gem-c-modal-dialogue__box{font-family:sans-serif;font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em) and (max-width:64em){.gem-c-modal-dialogue__box--wide{margin:30px}}.gem-c-modal-dialogue__overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:.8;background:#0b0c0c;pointer-events:none;touch-action:none}@media screen{.gem-o-template--modal{overflow-y:inherit}}.gem-o-template__body--modal{overflow:hidden}.gem-o-template__body--blur .govuk-footer,.gem-o-template__body--blur .govuk-header,.gem-o-template__body--blur .govuk-main-wrapper,.gem-o-template__body--blur .govuk-phase-banner,.gem-o-template__body--blur .govuk-skip-link,.gem-o-template__body--blur .govuk-width-container .govuk-back-link{filter:blur(2px)}.govuk-warning-text__icon{margin:0 0 0 12px}.gem-c-modal-dialogue__header{padding:9px 15px 10px;color:#fff;background:#d4351d;display:flex}.gem-c-modal-dialogue__title{margin:5px 0 4px 12px}.gem-c-modal-dialogue__logotype-crown{fill:currentColor;vertical-align:middle}.gem-c-modal-dialogue__logotype-crown-fallback-image{width:30px;height:26px;border:0;vertical-align:middle}.gem-c-modal-dialogue__content{padding:15px;background:#fff}.gem-c-modal-dialogue__close-button{position:absolute;top:0;right:0;width:44px;height:44px;border:0;color:#fff;background:0 0;cursor:pointer;font-family:"GDS Transport",Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:1.5rem;line-height:1.3}@media (min-width:40.0625em){.gem-c-modal-dialogue__box--wide{max-width:960px}.gem-c-modal-dialogue__close-button{font-size:2.25rem;line-height:1.3}}@media print{.gem-c-modal-dialogue__close-button{font-family:sans-serif;font-size:24pt;line-height:1.3}}@media (max-width:40.0525em){.gem-c-modal-dialogue__close-button{font-size:36px;line-height:1.3}}.gem-c-modal-dialogue__close-button:focus,.gem-c-modal-dialogue__close-button:hover{color:#0b0c0c;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none;outline:0;background:#fd0}']}]}],M.ctorParameters=function(){return[]},M.propDecorators={positionTop:[{type:g.Input}],close:[{type:g.Output}]},M);function M(){this.close=new g.EventEmitter}var P=(Object.defineProperty(U.prototype,"errorMessages",{set:function(e){this.isInvalid=e||{}},enumerable:!0,configurable:!0}),U.prototype.onSubmit=function(){this.submitForm.emit()},U.decorators=[{type:g.Component,args:[{selector:"xuilib-invite-user-form",template:'\n<form [formGroup]="inviteUserForm" (ngSubmit)="onSubmit()" >\n\n <xuilib-gov-uk-input\n [config]="{label: \'First name\', hint: \'Include all middle names.\', name: \'firstName\', id: \'firstName\', type: \'text\', classes: \'testClass\'}"\n [errorMessage]="isInvalid.firstName"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-gov-uk-input\n [config]="{label: \'Last name\', name: \'lastName\', id: \'lastName\', type: \'text\'}"\n [errorMessage]="isInvalid.lastName"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-gov-uk-input\n [config]="{label: \'Email address\', name: \'email\', id: \'email\', type: \'email\'}"\n [errorMessage]="isInvalid.email"\n [group]="inviteUserForm">\n </xuilib-gov-uk-input>\n\n <xuilib-invite-permission-form [inviteUserForm]="inviteUserForm" [errorMessages]="isInvalid.roles">\n </xuilib-invite-permission-form>\n\n <button type="submit" class="govuk-button">\n Send invitation\n </button>\n</form>\n'}]}],U.propDecorators={submitForm:[{type:g.Output}],inviteUserForm:[{type:g.Input}],errorMessages:[{type:g.Input}]},U);function U(){this.submitForm=new g.EventEmitter}var j=(B.decorators=[{type:g.Component,args:[{selector:"xuilib-invite-permission-form",template:" \x3c!--permissions --\x3e\n <ng-container [formGroup]=\"inviteUserForm\">\n <xuilib-gov-uk-form-group-wrapper\n [config]=\"{hint: 'Choose what the user will be able to do. You can change this later.', legend: 'Permissions', key: 'roles'}\"\n [formGroupName]=\"'roles'\"\n [error]=\"errorMessages\">\n\n <div class=\"govuk-checkboxes\">\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiCaseManager\"\n [config]=\"{value: 'pui-case-manager', label: 'Manage Cases', name: 'roles', hint: 'View, create and progress cases.', focusOn: 'roles'}\">\n </xuilib-gov-checkbox>\n\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiUserManager\"\n [config]=\"{value: 'pui-user-manager', label: 'Manage Users', name: 'roles',\n hint: 'Invite users.'}\">\n </xuilib-gov-checkbox>\n\n <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiOrganisationManager\"\n [config]=\"{value: 'pui-organisation-manager', label: 'Manage Organisation', name: 'roles',\n hint: 'View organisation name and addresses.'}\">\n </xuilib-gov-checkbox>\n\n \x3c!-- <xuilib-gov-checkbox\n [group]=\"inviteUserForm.controls['roles']\"\n [isChecked]=\"isPuiFinanceManager\"\n [config]=\"{value: 'pui-finance-manager', label: 'Manage Payments', name: 'roles',\n hint: 'View account balances, available credit and transactions.'}\">\n </xuilib-gov-checkbox> --\x3e\n </div>\n\n </xuilib-gov-uk-form-group-wrapper>\n</ng-container>"}]}],B.propDecorators={inviteUserForm:[{type:g.Input}],isPuiCaseManager:[{type:g.Input}],isPuiUserManager:[{type:g.Input}],isPuiOrganisationManager:[{type:g.Input}],isPuiFinanceManager:[{type:g.Input}],errorMessages:[{type:g.Input}]},B);function B(){this.isPuiCaseManager=!1,this.isPuiUserManager=!1,this.isPuiOrganisationManager=!1,this.isPuiFinanceManager=!1}var R=(V.decorators=[{type:g.Component,args:[{selector:"xuilib-loading-spinner",template:'<div class="spinner-container">\n <div class="spinner-inner-container">\n <p>{{loadingText}}</p>\n <div class="spinner" style="margin: auto;"></div>\n </div>\n</div>\n',encapsulation:g.ViewEncapsulation.None,styles:[".spinner-container{position:fixed;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,.5);z-index:99}.spinner-container .spinner-inner-container p{text-align:center}.spinner-container .spinner-inner-container .spinner{border:10px solid #ddd;border-top:10px solid #000;border-radius:50%;width:40px;height:40px;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]}]}],V.propDecorators={loadingText:[{type:g.Input}]},V);function V(){this.loadingText="Loading"}var G=(Object.defineProperty(z.prototype,"state",{get:function(){return this.subject.asObservable().pipe(m.distinctUntilChanged())},enumerable:!0,configurable:!0}),z.prototype.setCases=function(e){var t=this;this.caseState=[],e.forEach(function(e){t.caseState.push({caseId:e.caseId,caseTitle:e.caseTitle,caseTypeId:e.caseTypeId,roles:e.roles,sharedWith:e.sharedWith,pendingShares:e.pendingShares,pendingUnshares:e.pendingUnshares})}),this.subject.next(this.caseState)},z.prototype.getCases=function(){return this.caseState},z.prototype.requestShare=function(t){var e,n,o=this.caseState.slice(),i=[];try{for(var s=y(o),r=s.next();!r.done;r=s.next()){var a=r.value;a.pendingShares||(a.pendingShares=[]);var l=a.pendingShares.slice();a.pendingUnshares||(a.pendingUnshares=[]);var c=a.pendingUnshares.slice();if(this.userHasAccess(a,t)){for(var u=0,d=c.length;u<d;u++)if(c[u].email===t.email){c.splice(u,1);break}}else l.some(function(e){return e.email===t.email})||l.push(t);var p=b({},a,{pendingUnshares:c,pendingShares:l});i.push(p)}}catch(g){e={error:g}}finally{try{r&&!r.done&&(n=s["return"])&&n.call(s)}finally{if(e)throw e.error}}return this.subject.next(i),i},z.prototype.requestUnshare=function(t,e){var n,o,i=[];try{for(var s=y(this.caseState),r=s.next();!r.done;r=s.next()){var a,l,c,u,d=r.value;e===undefined||d.caseId===e?(d.pendingUnshares||(d.pendingUnshares=[]),a=d.pendingUnshares.slice(),l=void 0,c=-1,d.pendingShares&&-1<(c=d.pendingShares.findIndex(function(e){return e.idamId===t.idamId}))&&(l=d.pendingShares.slice()).splice(c,1),-1===c&&d.sharedWith&&-1<d.sharedWith.findIndex(function(e){return e.idamId===t.idamId})&&(a.some(function(e){return e.email===t.email})||a.push(t)),u=b({},d,{pendingUnshares:a},l&&{pendingShares:l}),i.push(u)):i.push(d)}}catch(p){n={error:p}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}return this.subject.next(i),i},z.prototype.requestCancel=function(e,t){var n,o,i=[];try{for(var s=y(this.caseState),r=s.next();!r.done;r=s.next()){var a=r.value;if(a.caseId===e){a.pendingUnshares||(a.pendingUnshares=[]);for(var l=a.pendingUnshares.slice(),c=0;c<l.length;c++)if(l[c].email===t.email){l.splice(c,1);break}a.pendingShares||(a.pendingShares=[]);for(var u=a.pendingShares.slice(),d=0;d<u.length;d++)if(u[d].email===t.email){u.splice(d,1);break}var p=b({},a,{pendingUnshares:l,pendingShares:u});i.push(p)}else i.push(a)}}catch(g){n={error:g}}finally{try{r&&!r.done&&(o=s["return"])&&o.call(s)}finally{if(n)throw n.error}}this.subject.next(i)},z.prototype.removeCase=function(e){if(1<this.caseState.length)for(var t=0,n=this.caseState.length;t<n;t++)if(this.caseState[t].caseId===e)return this.caseState.splice(t,1),void this.subject.next(this.caseState)},z.prototype.userHasAccess=function(e,t){if(!e.sharedWith)return!1;for(var n=0,o=e.sharedWith.length;n<o;n++)if(e.sharedWith[n].email===t.email)return!0;return!1},z.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[]},z.ngInjectableDef=g.defineInjectable({factory:function(){return new z},token:z,providedIn:"root"}),z);function z(){this.caseState=[],this.subject=new h.BehaviorSubject(this.caseState)}var W=(H.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){return t.shareCases=e})},H.prototype.trackByUserId=function(e){return e.idamId},H.prototype.showUserAccessBlock=function(){return!!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)||this.sharedCase.pendingUnshares&&0<this.sharedCase.pendingUnshares.length},H.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case-confirm",template:'<div id="user-access-block-{{ sharedCase.caseId }}" *ngIf="showUserAccessBlock()">\n <h2 class="govuk-heading-m case-share-confirm__title">{{ sharedCase.caseTitle }}</h2>\n <div class="case-share-confirm__caption-area">\n <div class="govuk-caption-m case-share-confirm__caption">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]="changeLink" class="case-share-confirm__change-link govuk-link govuk-!-font-size-19">Change</a>\n </div>\n <table class="govuk-table">\n <thead class="govuk-table__head">\n <tr class="govuk-table__row">\n <th class="govuk-table__header govuk-table-column-header" scope="col">Name</th>\n <th class="govuk-table__header govuk-table-column-header" scope="col">Email address</th>\n <th class="govuk-table__header govuk-table-column-actions" scope="col">Actions</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let user of sharedCase.pendingShares; trackBy: trackByUserId">\n <td class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <span class="hmcts-badge">To be added</span>\n </td>\n </tr>\n <tr class="govuk-table__row" *ngFor="let user of sharedCase.pendingUnshares; trackBy: trackByUserId">\n <td class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <span class="hmcts-badge hmcts-badge--red">To be removed</span>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n',styles:[".case-share-confirm__title{margin-bottom:0}.case-share-confirm__caption-area{border-bottom:1px solid #b1b4b6;padding-bottom:10px;display:inline-block;width:100%;clear:both}.case-share-confirm__caption{float:left}.case-share-confirm__change-link{float:right}.govuk-table-column-header{width:45%}.govuk-table-column-actions{width:10%}"]}]}],H.ctorParameters=function(){return[{type:G}]},H.propDecorators={sharedCase:[{type:g.Input}],changeLink:[{type:g.Input}]},H);function H(e){this.stateService=e,this.changeLink=""}var $=(q.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){t.shareCases=e,t.caseCount=t.shareCases.length})},q.prototype.onUnselect=function(e){this.unselect.emit(e),this.caseCount=this.shareCases.length},q.prototype.onSynchronizeStore=function(e){this.synchronizeStore.emit(e)},q.prototype.trackByCaseId=function(e){return e.caseId},q.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case-list",template:'<ng-container *ngIf="!toConfirm">\n <xuilib-selected-case\n *ngFor="let sharedCase of (shareCases$ | async); trackBy: trackByCaseId"\n [sharedCase]="sharedCase"\n [caseCount]="caseCount"\n [removeUserFromCaseToggleOn]="removeUserFromCaseToggleOn"\n (unselect)="onUnselect($event)"\n (synchronizeStore)="onSynchronizeStore($event)"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf="toConfirm">\n <xuilib-selected-case-confirm\n *ngFor="let sharedCase of (shareCases$ | async); trackBy: trackByCaseId"\n [sharedCase]="sharedCase"\n [changeLink]="changeLink">\n </xuilib-selected-case-confirm>\n</ng-container>\n',styles:[""]}]}],q.ctorParameters=function(){return[{type:G}]},q.propDecorators={shareCases$:[{type:g.Input}],removeUserFromCaseToggleOn:[{type:g.Input}],toConfirm:[{type:g.Input}],changeLink:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}]},q);function q(e){this.stateService=e,this.shareCases=[],this.toConfirm=!1,this.changeLink="",this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter}var J=(K.prototype.ngOnInit=function(){var t=this;this.shareCases$=this.stateService.state,this.shareCases$.subscribe(function(e){return t.shareCases=e})},K.prototype.ngOnChanges=function(e){var t;e.sharedCase&&(t=this.sharedCase.sharedWith||[],e=this.sharedCase.pendingShares||[],this.combinedSortedShares=this.combineAndSortShares(t,e))},K.prototype.onDeselect=function(e){this.unselect.emit(e)},K.prototype.trackByUserId=function(e){return e.idamId},K.prototype.canRemove=function(a,l){var c=this;return this.shareCases$.pipe(m.map(function(e){var t,n;if(c.removeUserFromCaseToggleOn)try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a){if(s.pendingUnshares&&s.pendingUnshares.some(function(e){return e.idamId===l.idamId}))return!1;if(s.sharedWith&&s.sharedWith.some(function(e){return e.idamId===l.idamId}))return!0}}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}return!1}))},K.prototype.canCancel=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return!(!s.pendingShares||!s.pendingShares.some(function(e){return e.idamId===l.idamId}))||!(!s.pendingUnshares||!s.pendingUnshares.some(function(e){return e.idamId===l.idamId}))}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.isToBeRemoved=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return s.pendingUnshares&&s.pendingUnshares.some(function(e){return e.idamId===l.idamId})}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.isToBeAdded=function(a,l){return this.shareCases$.pipe(m.map(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.caseId===a)return s.pendingShares&&s.pendingShares.some(function(e){return e.idamId===l.idamId})}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}}))},K.prototype.onRemove=function(e,t){this.stateService.requestUnshare(e,t.caseId),this.synchronizeStore.emit(this.shareCases)},K.prototype.onCancel=function(e,t){this.stateService.requestCancel(t.caseId,e),this.synchronizeStore.emit(this.shareCases)},K.prototype.showNoUsersAccessInfo=function(){return!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)&&(!(!this.sharedCase.sharedWith||0!==this.sharedCase.sharedWith.length)||!!(this.sharedCase.sharedWith&&this.sharedCase.pendingUnshares&&0<this.sharedCase.pendingUnshares.length&&this.sharedCase.sharedWith.length===this.sharedCase.pendingUnshares.length))},K.prototype.showUserHasAccessInfo=function(){return!this.showNoUsersAccessInfo()},K.prototype.showUserAccessTable=function(){return!!(this.sharedCase.pendingShares&&0<this.sharedCase.pendingShares.length)||!!(this.sharedCase.sharedWith&&0<this.sharedCase.sharedWith.length)},K.prototype.combineAndSortShares=function(e,t){return C(e,t).sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:t.firstName.toLowerCase()>e.firstName.toLowerCase()?-1:0})},K.prototype.userIdSetter=function(e,t){return e?"pendingShares-"+t:""+t},K.prototype.buildElementId=function(e){return e+"-"+this.sharedCase.caseId},K.decorators=[{type:g.Component,args:[{selector:"xuilib-selected-case",template:'<div id="{{buildElementId(\'govuk-accordion__section\')}}" class="govuk-accordion__section">\n <div class="govuk-grid-row govuk-case-header">\n <div class="govuk-grid-column-three-quarters">\n <h3 id="{{buildElementId(\'case-title\')}}" class="govuk-case-title">{{ sharedCase.caseTitle }}</h3>\n <h1 id="{{buildElementId(\'case-id\')}}" class="govuk-case-sub-title">{{ sharedCase.caseId }}</h1>\n </div>\n <div class="govuk-grid-column-twenty-percent">\n <button *ngIf="caseCount > 1"\n id="{{buildElementId(\'btn-deselect-case\')}}" \n class="govuk-button hmcts-button--secondary" \n (click)="onDeselect(sharedCase)" \n title="Deselect case">Deselect case\n </button>\n </div>\n <div class="govuk-accordion__section-header govuk-grid-column-five-percent">\n <div class="govuk-accordion__section-heading">\n <button type="button" id="{{buildElementId(\'accordion-with-summary-sections-heading\')}}"\n aria-controls="accordion-with-summary-sections-content-1" class="govuk-accordion__section-button"\n aria-describedby="accordion-with-summary-sections-summary-1" aria-expanded="false" title="Expand or Collapse">\n <span class="govuk-accordion__icon" aria-hidden="true"></span></button>\n </div>\n </div>\n </div>\n <div id="{{buildElementId(\'accordion-with-summary-sections-content\')}}" class="govuk-accordion__section-content"\n aria-labelledby="buildElementId(\'accordion-with-summary-sections-heading\')" >\n <div class="govuk-grid-row" *ngIf="showNoUsersAccessInfo()">\n <span id="{{buildElementId(\'access-info-no-user\')}}" class="govuk-div-align-left">No users from your organisation currently have access to this case.</span>\n </div>\n <div class="govuk-grid-row" *ngIf="showUserHasAccessInfo()">\n <span id="{{buildElementId(\'access-info-has-users\')}}" class="govuk-div-align-left">Users from your organisation with access to this case.</span>\n </div>\n <table class="govuk-table" *ngIf="showUserAccessTable()">\n <thead class="govuk-table__head">\n <tr class="govuk-table__row">\n <th id="{{buildElementId(\'name-heading\')}}" class="govuk-table__header govuk-table-column-header" scope="col">Name</th>\n <th id="{{buildElementId(\'email-heading\')}}" class="govuk-table__header govuk-table-column-header" scope="col">Email address</th>\n <th id="{{buildElementId(\'action-heading\')}}" class="govuk-table__header govuk-table-column-actions" scope="col">Actions</th>\n <th id="{{buildElementId(\'label-heading\')}}" class="govuk-table__header govuk-table-column-label" scope="col">Status</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row" *ngFor="let user of combinedSortedShares; index as idx; trackBy: trackByUserId">\n <td id="user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}" class="govuk-table__cell">{{ user.firstName + \' \' + user.lastName }}</td>\n <td id="user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}" class="govuk-table__cell">{{ user.email }}</td>\n <td class="govuk-table__cell">\n <a *ngIf="canRemove(sharedCase.caseId, user) | async" (click)="onRemove(user, sharedCase)" href="javascript:void(0);">Remove <span class="govuk-visually-hidden">{{ user.firstName + \' \' + user.lastName }} from case</span></a>\n <a *ngIf="canCancel(sharedCase.caseId, user) | async" (click)="onCancel(user, sharedCase)" href="javascript:void(0);">Cancel <span class="govuk-visually-hidden">adding {{ user.firstName + \' \' + user.lastName }} to case</span></a>\n </td>\n <td class="govuk-table__cell">\n <span *ngIf="isToBeRemoved(sharedCase.caseId, user) | async" class="hmcts-badge hmcts-badge--red">To be removed</span>\n <span *ngIf="isToBeAdded(sharedCase.caseId, user) | async" class="hmcts-badge">To be added</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n',styles:[".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}"]}]}],K.ctorParameters=function(){return[{type:G}]},K.propDecorators={sharedCase:[{type:g.Input}],selectedUser:[{type:g.Input}],opened:[{type:g.Input}],removeUserFromCaseToggleOn:[{type:g.Input}],caseCount:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}]},K);function K(e){this.stateService=e,this.opened=!1,this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter}var Y=(Q.prototype.onHideMessageEvent=function(e){this.hideMessage.emit(e)},Q.decorators=[{type:g.Component,args:[{selector:"xuilib-service-message",template:'<div class="hmcts-banner hmcts-banner--warning">\n\n <svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false"\n xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" />\n </svg>\n\n <div class="hmcts-banner__message">\n <span class="hmcts-banner__assistive">Warning</span>\n <h2 class="govuk-heading-s" [innerHTML]="message"></h2>\n <a [routerLink]="" class="govuk-link--no-visited-state" (click)="onHideMessageEvent(key)">Hide message</a>\n </div>\n\n</div>'}]}],Q.ctorParameters=function(){return[]},Q.propDecorators={message:[{type:g.Input}],key:[{type:g.Input}],hideMessage:[{type:g.Output}]},Q);function Q(){this.hideMessage=new g.EventEmitter}var X=(Z.prototype.initialize=function(e,t){throw new Error("Not implemented")},Z.prototype.isEnabled=function(e){throw new Error("Not implemented")},Z.prototype.getValue=function(e,t){throw new Error("Not implemented")},Z.prototype.getValueOnce=function(e,t){throw new Error("Not implemented")},Z.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Z.ngInjectableDef=g.defineInjectable({factory:function(){return new Z},token:Z,providedIn:"root"}),Z);function Z(){}var ee=(te.prototype.ngOnInit=function(){this.getServiceMessages()},te.prototype.getServiceMessages=function(){var t=this;this.featureToggleService.getValue(this.featureToggleKey,null).subscribe(function(e){e&&t.createFilteredMessages(e)})},te.prototype.createFilteredMessages=function(n){var o=this;this.hiddenBanners=JSON.parse(window.sessionStorage.getItem(this.serviceMessageCookie))||[],Object.keys(n).forEach(function(e){var t=new RegExp(e);o.userRoles.some(function(e){return t.test(e)})&&-1===o.hiddenBanners.indexOf(e)&&o.filteredMessages.set(e,n[e])})},te.prototype.hideMessage=function(e){this.filteredMessages["delete"](e),this.hiddenBanners.push(e),window.sessionStorage.setItem(this.serviceMessageCookie,JSON.stringify(this.hiddenBanners))},te.decorators=[{type:g.Component,args:[{selector:"xuilib-service-messages",template:'<div *ngIf="filteredMessages?.size > 0" class="govuk-width-container govuk-!-margin-top-6">\n <xuilib-service-message *ngFor="let message of filteredMessages | keyvalue" [key]="message.key"\n [message]="message.value" (hideMessage)="hideMessage($event)"></xuilib-service-message>\n</div>'}]}],te.ctorParameters=function(){return[{type:X}]},te.propDecorators={userRoles:[{type:g.Input}],featureToggleKey:[{type:g.Input}],serviceMessageCookie:[{type:g.Input}]},te);function te(e){this.featureToggleService=e,this.filteredMessages=new Map}var ne=(oe.prototype.ngOnInit=function(){var t=this;this.shareCases$.subscribe(function(e){t.shareCases=e,t.stateService.setCases(e)}),this.shareCases$=this.stateService.state},oe.decorators=[{type:g.Component,args:[{selector:"xuilib-share-case-confirm",template:'<div id="casesToConfirm">\n <h3 class="govuk-heading-l">Cases</h3>\n <div *ngIf="shareCases && shareCases.length > 0" id="summarySections">\n <xuilib-selected-case-list\n [shareCases$]="shareCases$"\n [toConfirm]="true"\n [changeLink]="changeLink">\n </xuilib-selected-case-list>\n </div>\n\n <div id="noCaseDisplay" *ngIf="shareCases && shareCases.length === 0" class="govuk-hint">\n No cases to display.\n </div>\n\n</div>\n\n<div id="share-case-nav" *ngIf="shareCases && shareCases.length > 0">\n <button class="govuk-button" title="Confirm" [routerLink]="completeLink">Confirm</button>\n</div>\n',styles:[""]}]}],oe.ctorParameters=function(){return[{type:G}]},oe.propDecorators={shareCases$:[{type:g.Input}],changeLink:[{type:g.Input}],completeLink:[{type:g.Input}]},oe);function oe(e){this.stateService=e,this.shareCases=[],this.changeLink="",this.completeLink=""}var ie={OneCaseMustBeSelected:"At least one case must be selected",NoChangesRequested:"You have not requested any changes to case sharing",OnePersonMustBeAssigned:"At least one person must be assigned to each case"},se=(re.prototype.ngOnInit=function(){var t=this;this.filteredUsers=this.control.valueChanges.pipe(m.map(function(e){return"string"==typeof e?t.filterUsers(e):t.users})),this.selected.emit(null)},re.prototype.displayValue=function(e){return e?e.firstName+" "+e.lastName+" - "+e.email:""},re.prototype.onSelected=function(e){this.selected.emit(e.option.value)},re.prototype.clear=function(){this.control.setValue(null)},re.prototype.onUserChange=function(e){e&&e.email||this.selected.emit(null)},re.prototype.filterUsers=function(t){return t?(t=t.toLowerCase(),this.users.filter(function(e){return!!e.firstName.toLowerCase().includes(t)||(!!e.lastName.toLowerCase().includes(t)||!!e.email.toLowerCase().includes(t))})):[]},re.decorators=[{type:g.Component,args:[{selector:"xuilib-user-select",template:'<input class="govuk-input" type="text" [matAutocomplete]="dropdown" [formControl]="control" (ngModelChange)="onUserChange($event)" aria-labelledby="add-user-hint">\n\n<mat-autocomplete #dropdown="matAutocomplete" [displayWith]="displayValue" autoActiveFirstOption (optionSelected)="onSelected($event)">\n <mat-option *ngFor="let user of filteredUsers | async" [value]="user">\n {{ user.firstName }} {{ user.lastName }} - {{ user.email }}\n </mat-option>\n</mat-autocomplete>',styles:[""]}]}],re.ctorParameters=function(){return[]},re.propDecorators={users:[{type:g.Input}],selected:[{type:g.Output}]},re);function re(){this.selected=new g.EventEmitter,this.control=new d.FormControl}var ae=(le.prototype.ngOnInit=function(){var t=this;this.shareCases$.pipe(m.tap(function(e){t.getAssignedUsers(e.filter(function(e){return e.sharedWith&&0<e.sharedWith.length}))})).subscribe(function(e){t.shareCases=e,t.stateService.setCases(e),e&&(t.selectedCasesErrorMessageConfig={id:0<e.length?"cases":"noCaseDisplay"})}),this.shareCases$=this.stateService.state,this.shareCaseErrorMessage={isInvalid:!1,messages:[]}},le.prototype.onUnselect=function(e){this.validationErrors=[],1===this.stateService.getCases().length?(this.validationErrors.push({id:"cases",message:ie.OneCaseMustBeSelected}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.OneCaseMustBeSelected]},window.scrollTo({top:0,left:0,behavior:"smooth"})):(this.unselect.emit(e),this.stateService.removeCase(e.caseId))},le.prototype.onSynchronizeStore=function(e){this.synchronizeStore.emit(e)},le.prototype.onSelectedUser=function(e){this.selectedUser=e},le.prototype.addUser=function(){var e=this.stateService.requestShare(this.selectedUser);this.selectedUser=null,this.userSelect&&this.userSelect.clear(),this.synchronizeStore.emit(e),this.getAssignedUsers(e)},le.prototype.removeUser=function(){var e;this.selectedUserToRemove&&(e=this.stateService.requestUnshare(this.selectedUserToRemove),this.synchronizeStore.emit(e))},le.prototype.isDisabledAdd=function(){return null===this.selectedUser||0===this.shareCases.length},le.prototype.setContinueAllowed=function(){var a=this;this.continueAllowed=!1,this.shareCases$.subscribe(function(e){var t,n;try{for(var o=y(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(s.pendingShares&&0<s.pendingShares.length){a.continueAllowed=!0;break}if(s.pendingUnshares&&0<s.pendingUnshares.length){a.continueAllowed=!0;break}}}catch(r){t={error:r}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}})},le.prototype.onDeselect=function(e){var t,n;if(null!==e){var o=[];try{for(var i=y(this.shareCases),s=i.next();!s.done;s=i.next()){var r=s.value;r.caseId!==e.caseId&&o.push(r)}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}this.shareCases=o}this.stateService.setCases(this.shareCases)},le.prototype.onContinue=function(){this.setContinueAllowed(),this.continueAllowed||(this.validationErrors=[],this.validationErrors.push({id:"cases",message:ie.NoChangesRequested}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.NoChangesRequested]},window.scrollTo({top:0,left:0,behavior:"smooth"})),this.continueAllowed&&(this.hasCasesLeftUnassigned(this.shareCases)?(this.validationErrors=[],this.validationErrors.push({id:"cases",message:ie.OnePersonMustBeAssigned}),this.shareCaseErrorMessage={isInvalid:!0,messages:[ie.OnePersonMustBeAssigned]},window.scrollTo({top:0,left:0,behavior:"smooth"})):this.router.navigate([this.confirmLink]))},le.prototype.getAssignedUsers=function(e){var n=[];e.forEach(function(e){e.sharedWith&&e.sharedWith.forEach(function(t){n.some(function(e){return t.idamId===e.idamId})||n.push(t)}),e.pendingShares&&e.pendingShares.forEach(function(t){n.some(function(e){return t.idamId===e.idamId})||n.push(t)})}),this.assignedUsers=n},le.prototype.hasCasesLeftUnassigned=function(e){return e.some(function(e){return e.pendingUnshares&&e.sharedWith&&e.pendingUnshares.length===e.sharedWith.length&&(!e.pendingShares||0===e.pendingShares.length)})},le.decorators=[{type:g.Component,args:[{selector:"xuilib-share-case",template:'<xuilib-hmcts-error-summary\n [errorMessages]="validationErrors"\n [header]="\'There is a problem\'"\n></xuilib-hmcts-error-summary>\n<h1 *ngIf="title" class="govuk-heading-xl govuk-!-margin-top-2">\n <span *ngIf="fnTitle" class="govuk-caption-xl">{{fnTitle}}</span>\n {{title}}\n</h1>\n<div id="add-user">\n <div class="govuk-form-group">\n <label class="govuk-label govuk-!-font-weight-bold" for="add-user-input">{{addUserLabel}}</label>\n <span id="add-user-hint" class="govuk-hint">\n Search by name or email address. You can share access with as many people as you need.\n </span>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <xuilib-user-select\n id="add-user-input"\n aria-describedby="add-user-hint"\n [users]="users"\n (selected)="onSelectedUser($event)">\n </xuilib-user-select>\n </div>\n <div class="govuk-grid-column-one-thirds">\n <button id="btn-add-user" (click)="addUser()" class="govuk-button govuk-button--secondary" [disabled]="isDisabledAdd()" title="Add user to selected cases">Add</button>\n </div>\n </div>\n <details id="add-user-help" class="govuk-details" data-module="govuk-details">\n <summary class="govuk-details__summary">\n <span id="content-why-can-not-find-email" class="govuk-details__summary-text">\n Can\'t find an email address?\n </span>\n </summary>\n <div id="content-reason-can-not-find-email" class="govuk-details__text">\n If you can\'t find your colleague\'s email address, they will need to complete their registration. Contact your\n administrator for help.\n </div>\n </details>\n </div>\n <div class="govuk-form-group" *ngIf="showRemoveUsers">\n <label class="govuk-label govuk-!-font-weight-bold" for="remove-user-input">Remove a person from all cases</label>\n <span id="remove-user-hint" class="govuk-hint">\n Select a person to remove them from all selected cases.\n </span>\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <select [(ngModel)]="selectedUserToRemove" class="govuk-select" id="remove-user-input" aria-describedby="remove-user-hint">\n <option [ngValue]="null" selected>Select a person</option>\n <option *ngFor="let user of assignedUsers" [ngValue]="user">{{user.firstName}} {{user.lastName}} - {{user.email}}</option>\n </select>\n </div>\n <div class="govuk-grid-column-one-thirds">\n <button id="btn-remove-user" (click)="removeUser()" class="govuk-button govuk-button--secondary" title="Remove user from selected cases">Remove</button>\n </div>\n </div>\n </div>\n</div>\n\n<div id="cases" [ngClass]="{\'govuk-form-group--error\': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}">\n <h3 id="title-selected-cases" class="govuk-heading-m">Selected cases</h3>\n <xuilib-gov-uk-error-message [config]="selectedCasesErrorMessageConfig" [errorMessage]="shareCaseErrorMessage"></xuilib-gov-uk-error-message>\n <div *ngIf="shareCases && shareCases.length > 0" class="govuk-accordion" data-module="govuk-accordion" id="accordion-with-summary-sections">\n <xuilib-selected-case-list\n [shareCases$]="shareCases$"\n [removeUserFromCaseToggleOn]="removeUserFromCaseToggleOn"\n (unselect)="onUnselect($event)"\n (synchronizeStore)="onSynchronizeStore($event)"\n >\n </xuilib-selected-case-list>\n </div>\n\n <div id="noCaseDisplay" *ngIf="shareCases && shareCases.length === 0" class="govuk-hint"\n [ngClass]="{\'govuk-form-group--error\': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}">\n No cases to display.\n </div>\n\n</div>\n\n<div id="share-case-nav" class="govuk-button-group">\n <button id="btn-continue" class="govuk-button" data-module="govuk-button" (click)="onContinue()" title="Continue">Continue</button>\n <button id="btn-cancel" class="govuk-button govuk-button--secondary" data-module="govuk-button" title="Cancel" [routerLink]="cancelLink">Cancel</button>\n</div>\n',styles:["select{width:100%}"]}]}],le.ctorParameters=function(){return[{type:G},{type:p.Router}]},le.propDecorators={removeUserFromCaseToggleOn:[{type:g.Input}],shareCases$:[{type:g.Input}],users:[{type:g.Input}],confirmLink:[{type:g.Input}],cancelLink:[{type:g.Input}],addUserLabel:[{type:g.Input}],showRemoveUsers:[{type:g.Input}],fnTitle:[{type:g.Input}],title:[{type:g.Input}],unselect:[{type:g.Output}],synchronizeStore:[{type:g.Output}],userSelect:[{type:g.ViewChild,args:[se]}]},le);function le(e,t){this.stateService=e,this.router=t,this.shareCases=[],this.continueAllowed=!1,this.selectedUserToRemove=null,this.removeUserFromCaseToggleOn=!1,this.users=[],this.confirmLink="",this.cancelLink="",this.showRemoveUsers=!1,this.fnTitle="",this.title="",this.unselect=new g.EventEmitter,this.synchronizeStore=new g.EventEmitter,this.validationErrors=[]}var ce=(ue.prototype.tabChanged=function(e){this.tabChange.emit(e)},ue.decorators=[{type:g.Component,args:[{selector:"xuilib-tab",template:'<mat-tab-group animationDuration="0ms" (selectedTabChange)="tabChanged($event)">\n <mat-tab *ngFor="let tabItem of tabItems; let last = last;" [label]="tabItem.text">\n </mat-tab>\n</mat-tab-group>'}]}],ue.ctorParameters=function(){return[]},ue.propDecorators={tabItems:[{type:g.Input}],tabChange:[{type:g.Output}]},ue);function ue(){this.tabChange=new g.EventEmitter}var de=(pe.prototype.onClick=function(){this.confirm.emit()},pe.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-confirm",template:'<div class="govuk-width-container">\n <main role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <div class="column-two-thirds">\n <h1 class="govuk-heading-xl">Using this service</h1>\n <h2 class="govuk-heading-m">Terms and conditions</h2>\n <p>We\'ve recently updated the\n <a\n routerLink="/terms-and-conditions"\n rel="noopener noreferrer"\n target="_blank"\n >terms and conditions</a\n >.\n </p>\n <p>You must review and accept them.\n </p>\n <p>\n <button class="govuk-button" (click)="onClick()">\n {{ buttonText }}\n </button>\n </p>\n </div>\n </div>\n </div>\n <div class="govuk-grid-column-one-third"></div>\n </main>\n</div>\n',styles:[""]}]}],pe.ctorParameters=function(){return[]},pe.propDecorators={buttonText:[{type:g.Input}],confirm:[{type:g.Output}]},pe);function pe(){this.confirm=new g.EventEmitter}var ge=(he.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-display-html",template:"<ng-content></ng-content>",styles:[":host{display:block;width:100%}"]}]}],he.ctorParameters=function(){return[]},he);function he(){}var me=(fe.decorators=[{type:g.Component,args:[{selector:"xuilib-tc-display-plain",template:"<ng-content></ng-content>",styles:[":host{display:block;width:100%}"]}]}],fe.ctorParameters=function(){return[]},fe);function fe(){}var ve=(be.decorators=[{type:g.Component,args:[{selector:"xuilib-terms-and-conditions",template:'<ng-container [ngSwitch]="document.mimeType">\n <xuilib-tc-display-html *ngSwitchCase="\'text/html\'">\n <div [innerHTML]="document.content"></div>\n </xuilib-tc-display-html>\n <xuilib-tc-display-plain *ngSwitchCase="\'text/plain\'">\n {{ document.content }}\n </xuilib-tc-display-plain>\n <div *ngSwitchDefault>\n An error occured. Please try again.\n </div>\n</ng-container>\n',styles:[":host{display:block;width:100%}"]}]}],be.ctorParameters=function(){return[]},be.propDecorators={document:[{type:g.Input}]},be);function be(){}var ye=(ke.prototype.reinviteClick=function(e){this.reinvite.emit(e)},ke.prototype.suspendUser=function(e){this.suspendUserEvent.emit(e)},ke.prototype.userHasRole=function(e){return!(!this.user||!this.user.roles)&&this.user.roles.includes(e)},ke.decorators=[{type:g.Component,args:[{selector:"xuilib-user-details",template:'<div class="govuk-warning-text" *ngIf="warningTitle && warningTitle !== \'\'">\n<span class="govuk-warning-text__icon">!</span>\n<strong class="govuk-warning-text__text">\n {{ warningTitle }}\n</strong>\n</div>\n<table class="govuk-table" *ngIf="user">\n <tbody class="govuk-table__body">\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="row">Name</th>\n <td class="govuk-table__cell">{{user.fullName}}</td>\n <td class="govuk-table__cell"></td>\n </tr>\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="row">Email address</th>\n <td class="govuk-table__cell">{{user.email}}</td>\n <td class="govuk-table__cell"></td>\n </tr>\n <tr class="govuk-table__row" *ngIf="!user.resendInvite">\n <th class="govuk-table__header" scope="row">Permissions</th>\n <td class="govuk-table__cell">\n <div *ngIf="user.manageOrganisations === \'Yes\'">Manage organisations</div>\n <div *ngIf="user.manageUsers === \'Yes\'">Manage users</div>\n <div *ngIf="user.manageCases === \'Yes\'">Manage cases</div>\n <div *ngIf="userHasRole(\'pui-caa\')">Case access administrator</div>\n <div *ngIf="userHasRole(\'pui-finance-manager\')">Manage fee accounts</div>\n </td>\n <td class="govuk-table__cell"><a *ngIf="editPermissionRouterLink && showEditLink" [routerLink]="editPermissionRouterLink">Change <span class="govuk-visually-hidden">roles</span></a></td>\n </tr>\n </tbody>\n</table>\n<button *ngIf="showSuspendUserButton" class="govuk-button govuk-button--warning" (click)="suspendUser(user)">\n Suspend account\n</button>\n<div *ngIf="user && user.resendInvite">\n <div class="govuk-inset-text">\n <p>This user has already been invited but has not activated their account.</p>\n <p>If you resend an invitation, they\'ll receive an email from HM Courts and Tribunals to finish setting up their account.</p>\n <p>You can\'t invite the same user more than once an hour.</p>\n </div>\n <a role="button" draggable="false" class="govuk-button" (click)="reinviteClick(user)" id="resend-invite-button">\n Resend invitation\n </a>\n</div>\n<p class="govuk-body" *ngIf="showHelpLink && suspendHelpLink"><a [routerLink]="suspendHelpLink" target="_blank">Get help</a> to reactivate this account.</p>\n',styles:[":host{display:block}"]}]}],ke.propDecorators={user:[{type:g.Input}],editPermissionRouterLink:[{type:g.Input}],warningTitle:[{type:g.Input}],showEditLink:[{type:g.Input}],showHelpLink:[{type:g.Input}],suspendHelpLink:[{type:g.Input}],suspendUserEvent:[{type:g.Output}],showSuspendUserButton:[{type:g.Input}],reinvite:[{type:g.Output}]},ke);function ke(){this.showEditLink=!1,this.showHelpLink=!1,this.suspendUserEvent=new g.EventEmitter,this.showSuspendUserButton=!1,this.reinvite=new g.EventEmitter}var Ce=(Ie.prototype.ngOnInit=function(){this.pagination={itemsPerPage:50,currentPage:this.currentPageNumber,totalItems:this.pageTotalSize}},Ie.prototype.onUserClick=function(e){this.userClick.emit(e)},Ie.prototype.emitPageClickEvent=function(e){this.currentPageNumber=e,this.pageChange.emit(e)},Ie.decorators=[{type:g.Component,args:[{selector:"xuilib-user-list",template:'<table class="govuk-table">\n\n <thead clas="govuk-table__head">\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="col">Name</th>\n <th class="govuk-table__header" scope="col">Email</th>\n <th class="govuk-table__header" scope="col">Status</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <ng-container *ngFor="let u of users | paginate: { itemsPerPage: pagination.itemsPerPage, currentPage: currentPageNumber, totalItems: pagination.totalItems }">\n <tr class="govuk-table__row" data-selector="table-row">\n <td class="govuk-table__cell" data-selector="table-cell">\n <a class="govuk-link" [attr.title]="u.routerLinkTitle" [routerLink]="u.routerLink" (click)="onUserClick(u)">{{ u.fullName }}</a>\n </td>\n <td class="govuk-table__cell" data-selector="table-cell">{{ u.email }}</td>\n <td class="govuk-table__cell" data-selector="table-cell">{{ u.status }}</td>\n </tr>\n </ng-container>\n </tbody>\n</table>\n<xuilib-hmcts-pagination (pageChange)="emitPageClickEvent($event)" [pageSize]="pagination.itemsPerPage"></xuilib-hmcts-pagination>\n',styles:[":host{display:block}"]}]}],Ie.propDecorators={users:[{type:g.Input}],currentPageNumber:[{type:g.Input}],pageTotalSize:[{type:g.Input}],userClick:[{type:g.Output}],pageChange:[{type:g.Output}]},Ie);function Ie(){this.users=[],this.userClick=new g.EventEmitter,this.pageChange=new g.EventEmitter}var we=(xe.prototype.setCookie=function(e,t,n){this.document.cookie=e+"="+t+";"+(n?" expires="+n:"")},xe.prototype.getCookie=function(t){return this.document.cookie.split("; ").find(function(e){return e.startsWith(t+"=")}).split("=")[1]},xe.prototype.deleteCookie=function(e,t,n){this.document.cookie=e+"="+(t?"; path="+t:"")+(n?"; domain="+n:"")+"; expires=Thu, 01 Jan 1970 00:00:01 GMT; max-age=0"},xe.prototype.deleteCookieByPartialMatch=function(t,n,o){var i=this;this.document.cookie.split("; ").filter(function(e){return e.startsWith(""+t)}).forEach(function(e){i.deleteCookie(e.split("=")[0],n,o)})},xe.prototype.checkCookie=function(t){return this.document.cookie.split("; ").some(function(e){return e.trim().startsWith(t+"=")})},xe.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],xe.ctorParameters=function(){return[{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},xe.ngInjectableDef=g.defineInjectable({factory:function(){return new xe(g.inject(a.DOCUMENT))},token:xe,providedIn:"root"}),xe);function xe(e){this.document=e}var _e=new g.InjectionToken("Window");function Se(){return window}var Le=(Te.prototype.ngOnInit=function(){this.setState()},Te.prototype.acceptCookie=function(){this.cookieService.setCookie(this.identifier,"true",this.getExpiryDate()),this.setState(!0)},Te.prototype.rejectCookie=function(){this.cookieService.setCookie(this.identifier,"false",this.getExpiryDate()),this.setState(!0)},Te.prototype.setState=function(e){void 0===e&&(e=!1),this.isCookieBannerVisible=!this.cookieService.checkCookie(this.identifier),this.areCookiesAccepted()?this.notifyAcceptance():this.notifyRejection(),e&&this.window.location.reload()},Te.prototype.areCookiesAccepted=function(){return this.cookieService.checkCookie(this.identifier)&&"true"===this.cookieService.getCookie(this.identifier)},Te.prototype.notifyRejection=function(){this.rejectionNotifier.emit()},Te.prototype.notifyAcceptance=function(){this.acceptanceNotifier.emit()},Te.prototype.getExpiryDate=function(){var e=new Date,t=e.getTime();return e.setTime(t+31536e6),e.toUTCString()},Te.decorators=[{type:g.Component,args:[{selector:"xuilib-cookie-banner",template:'<div class="govuk-cookie-banner " role="region" attr.aria-label="\'Cookies on {{appName}}\'" *ngIf="isCookieBannerVisible">\n <div class="govuk-cookie-banner__message govuk-width-container">\n\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on {{appName}}</h2>\n\n <div class="govuk-cookie-banner__content">\n <p>We use some essential cookies to make this service work.</p>\n <p>We’d also like to use analytics cookies so we can understand how you use the service and make improvements.</p>\n </div>\n </div>\n </div>\n\n <div class="govuk-button-group">\n <button value="accept" type="button" name="cookies" class="govuk-button" data-module="govuk-button" (click)="acceptCookie()">\n Accept analytics cookies\n </button>\n <button value="reject" type="button" name="cookies" class="govuk-button" data-module="govuk-button" (click)="rejectCookie()">\n Reject analytics cookies\n </button>\n <a class="govuk-link" routerLink="/cookies">View cookies</a>\n </div>\n </div>\n</div>'}]}],Te.ctorParameters=function(){return[{type:we},{type:undefined,decorators:[{type:g.Inject,args:[_e]}]}]},Te.propDecorators={identifier:[{type:g.Input}],appName:[{type:g.Input}],rejectionNotifier:[{type:g.Output}],acceptanceNotifier:[{type:g.Output}]},Te);function Te(e,t){this.cookieService=e,this.rejectionNotifier=new g.EventEmitter,this.acceptanceNotifier=new g.EventEmitter,this.isCookieBannerVisible=!1,this.window=t}var Ee=function(){},Fe=function(){},Ae=function(){},Ne={NO_CHECK:"NO_CHECK",BOOKINGS_AND_BASE:"BOOKINGS_AND_BASE",POSSIBLE_BOOKINGS:"POSSIBLE_BOOKINGS"},De={JUDICIAL:"Judicial",CASEWORKER:"Legal Ops",ADMIN:"Admin",CTSC:"CTSC User",ALL:"All"},Oe={JUDICIAL:"JUDICIAL",CASEWORKER:"LEGAL_OPERATIONS",ADMIN:"ADMIN",CTSC:"CTSC",ALL:"ALL"},Me=(Pe.prototype.getAllLocations=function(e,t,n,o,i){return this.http.post("api/locations/getLocations",{serviceIds:e,locationType:t,searchTerm:n,userLocations:o,bookingLocations:i})},Pe.prototype.searchLocations=function(e,t,n){return this.http.get("api/prd/location/getLocations?serviceIds="+e+"&locationType="+t+"&searchTerm="+n)},Pe.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Pe.ctorParameters=function(){return[{type:s.HttpClient}]},Pe.ngInjectableDef=g.defineInjectable({factory:function(){return new Pe(g.inject(s.HttpClient))},token:Pe,providedIn:"root"}),Pe);function Pe(e){this.http=e}var Ue=(je.prototype.getItem=function(e,t){void 0===t&&(t=!1);var n=sessionStorage.getItem(e);return t&&this.removeItem(e),n},je.prototype.setItem=function(e,t){sessionStorage.setItem(e,t)},je.prototype.removeItem=function(e){sessionStorage.removeItem(e)},je.prototype.clear=function(){sessionStorage.clear()},je.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],je.ngInjectableDef=g.defineInjectable({factory:function(){return new je},token:je,providedIn:"root"}),je);function je(){}var Be=(Object.defineProperty(Re.prototype,"reset",{get:function(){return this.pReset},set:function(e){this.pReset=e,this.resetSearchTerm()},enumerable:!0,configurable:!0}),Object.defineProperty(Re.prototype,"selectedLocations",{get:function(){return this.pSelectedLocations},set:function(e){this.pSelectedLocations=e},enumerable:!0,configurable:!0}),Re.prototype.ngOnInit=function(){var e;this.singleMode&&0<this.selectedLocations.length&&(e=this.selectedLocations[0],this.form.controls.searchTerm.patchValue(e.site_name,{emitEvent:!1,onlySelf:!0})),this.search()},Re.prototype.filter=function(e){var t=this;this.getLocations(e).pipe(m.map(function(e){return t.removeSelectedLocations(e)}))},Re.prototype.onSelectionChange=function(e){this.form.controls.searchTerm.patchValue(e.site_name,{emitEvent:!1,onlySelf:!0}),this.locationSelected.emit(e)},Re.prototype.search=function(){var t=this;this.form.controls.searchTerm.valueChanges.pipe(m.tap(function(e){return t.locationInputChanged.next(e)}),m.tap(function(){return t.locations=[]}),m.tap(function(e){return t.term=e}),m.filter(function(e){return!!e&&e.length>=t.minSearchCharacters}),m.debounceTime(this.delay),m.mergeMap(function(e){return t.getLocations(e)}),m.map(function(e){return t.removeSelectedLocations(e)})).subscribe(function(e){return t.locations=e,t.cd.markForCheck(),1!==e.length||t.term!==e[0].site_name||t.singleMode?void(t.showAutocomplete=!0):(t.locationSelected.emit(e[0]),void(t.showAutocomplete=!1))})},Re.prototype.onInput=function(){this.searchLocationChanged.emit()},Re.prototype.getLocations=function(e){var t,n;return this.bookingCheck===Ne.BOOKINGS_AND_BASE?(t=JSON.parse(this.sessionStorageService.getItem("userLocations")),n=JSON.parse(this.sessionStorageService.getItem("bookingLocations"))):this.bookingCheck===Ne.POSSIBLE_BOOKINGS&&(this.serviceIds=this.serviceIds&&this.serviceIds.length?this.serviceIds:JSON.parse(this.sessionStorageService.getItem("bookableServices"))),this.locationService.getAllLocations(this.serviceIds,this.locationType,e,t,n)},Re.prototype.resetSearchTerm=function(){this.form.controls.searchTerm.patchValue("",{emitEvent:!1,onlySelf:!0})},Re.prototype.removeSelectedLocations=function(e){var t=this;return this.singleMode?e:e.filter(function(e){return!t.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)&&e.site_name})},Re.decorators=[{type:g.Component,args:[{selector:"exui-search-location",template:'<div class="auto-complete-container">\n <input\n id="inputLocationSearch"\n (input)="onInput()"\n [formControl]="form.controls.searchTerm"\n [matAutocomplete]="autoSearchLocation"\n class="govuk-input"\n [attr.disabled]="disabled">\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchLocation="matAutocomplete">\n <mat-option *ngFor="let location of locations"\n (onSelectionChange)="onSelectionChange(location)">\n {{ location.site_name }}\n </mat-option>\n <mat-option *ngIf="!locations.length && showAutocomplete && term && term.length >= this.minSearchCharacters">No results found</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{display:inline-block;margin-right:4px;width:calc(100% - 4px)}.autocomplete__input{line-height:24px;font-size:19px}"]}]}],Re.ctorParameters=function(){return[{type:Me},{type:Ue},{type:d.FormBuilder},{type:g.ChangeDetectorRef}]},Re.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],singleMode:[{type:g.Input}],locationType:[{type:g.Input}],serviceIds:[{type:g.Input}],submitted:[{type:g.Input}],delay:[{type:g.Input}],form:[{type:g.Input}],showAutocomplete:[{type:g.Input}],locations:[{type:g.Input}],bookingCheck:[{type:g.Input}],locationSelected:[{type:g.Output}],locationInputChanged:[{type:g.Output}],searchLocationChanged:[{type:g.Output}],reset:[{type:g.Input}],selectedLocations:[{type:g.Input}]},Re);function Re(e,t,n,o){this.locationService=e,this.sessionStorageService=t,this.fb=n,this.cd=o,this.disabled=null,this.singleMode=!1,this.locationType="",this.serviceIds="",this.submitted=!0,this.delay=500,this.showAutocomplete=!1,this.locations=[],this.locationSelected=new g.EventEmitter,this.locationInputChanged=new g.EventEmitter,this.searchLocationChanged=new g.EventEmitter,this.minSearchCharacters=3,this.term="",this.pSelectedLocations=[],this.pReset=!0,this.form=this.fb.group({searchTerm:[""]})}var Ve=(Object.defineProperty(Ge.prototype,"disabled",{get:function(){return this.pDisabled},set:function(e){e&&(this.searchLocationComponent.resetSearchTerm(),this.removeSelectedValues()),this.pDisabled=!0===this.disableInputField||null},enumerable:!0,configurable:!0}),Object.defineProperty(Ge.prototype,"services",{get:function(){return this.pServices},set:function(e){var t=this;this.pServices=e;var n=this.fields.find(function(e){if(t.field)return e.name===t.field.findLocationField});n&&(this.serviceIds="string"==typeof e?e:A(n.options,e).filter(function(e){return"services_all"!==e}).join(","))},enumerable:!0,configurable:!0}),Ge.prototype.ngOnInit=function(){this.selectedLocations=this.selectedLocations.filter(function(e){return e.epimms_id})},Ge.prototype.addLocation=function(){this.tempSelectedLocation&&(this.selectedLocations=C(this.selectedLocations,[this.tempSelectedLocation]),this.addSelectedLocationsToForm([this.tempSelectedLocation]),this.tempSelectedLocation=null,this.locations=[],this.searchLocationComponent.resetSearchTerm())},Ge.prototype.removeLocation=function(t){var e,n;t.epimms_id&&(this.selectedLocations=this.selectedLocations.filter(function(e){return e.epimms_id!==t.epimms_id}),-1<(n=(e=this.form.get(this.field.name)).value.findIndex(function(e){return e.epimms_id===t.epimms_id}))&&e.removeAt(n))},Ge.prototype.onInputChanged=function(e){"string"==typeof e&&1===this.field.maxSelected&&this.removeSelectedValues()},Ge.prototype.onSearchInputChanged=function(){this.locationFieldChanged.emit()},Ge.prototype.onLocationSelected=function(t){1===this.field.maxSelected?(this.removeSelectedValues(),this.addSelectedLocationsToForm([t])):this.selectedLocations.find(function(e){return e.epimms_id===t.epimms_id})||t.epimms_id&&(this.tempSelectedLocation=t)},Ge.prototype.removeSelectedValues=function(){for(var e=this.form.get(this.field.name),t=0;t<e.length;t++)e.removeAt(t);this.selectedLocations=[]},Ge.prototype.addSelectedLocationsToForm=function(e){var t,n,o=this.form.get(this.field.name);try{for(var i=y(e),s=i.next();!s.done;s=i.next()){var r=s.value;o.push(new d.FormControl(r))}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}},Ge.decorators=[{type:g.Component,args:[{selector:"xuilib-find-location",template:'<div class="location-picker-custom">\n <div class="search-location">\n <div>\n <label id="input-selected-location-label" *ngIf="locationTitle">{{locationTitle}}</label>\n </div>\n\n <div class="search-location__input-container">\n <exui-search-location class="search-location__input"\n [locations]="locations"\n [selectedLocations]="selectedLocations"\n [singleMode]="field.maxSelected === 1"\n [bookingCheck]="field.bookingCheckType"\n [delay]="300"\n [disabled]="disabled"\n [serviceIds]="serviceIds"\n (locationInputChanged)="onInputChanged($event)"\n (locationSelected)="onLocationSelected($event)"\n (searchLocationChanged)="onSearchInputChanged()"\n [locationType]="\'case-management\'"></exui-search-location>\n <a href="javascript:void(0)" (click)="addLocation()"\n class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0" data-module="govuk-button"\n *ngIf="enableAddLocationButton">\n Add\n </a>\n </div>\n </div>\n <ul class="hmcts-filter-tags selection-container" *ngIf="field.maxSelected != 1">\n <li class="location-selection" *ngFor="let selection of selectedLocations">\n <a class="hmcts-filter__tag" (click)="removeLocation(selection)" href="javascript:void(0)">\n {{ selection.site_name }}\n </a>\n </li>\n </ul>\n</div>\n',styles:[".search-location__input-container{display:flex}.search-location .auto-complete-container{min-width:unset;width:calc(100% - 4px)}.search-location__input{flex:1 0 auto}.search-location .govuk-button--secondary{background-color:#ddd}"]}]}],Ge.propDecorators={locationFieldChanged:[{type:g.Output}],selectedLocations:[{type:g.Input}],submitted:[{type:g.Input}],enableAddLocationButton:[{type:g.Input}],form:[{type:g.Input}],field:[{type:g.Input}],fields:[{type:g.Input}],locationTitle:[{type:g.Input}],disableInputField:[{type:g.Input}],searchLocationComponent:[{type:g.ViewChild,args:[Be]}],disabled:[{type:g.Input}],services:[{type:g.Input}]},Ge);function Ge(){this.locationFieldChanged=new g.EventEmitter,this.selectedLocations=[],this.submitted=!0,this.enableAddLocationButton=!0,this.locationTitle="Search for a location by name",this.disableInputField=!1,this.locations=[],this.tempSelectedLocation=null,this.serviceIds="SSCS,IA",this.pServices=[],this.pDisabled=!1}var ze=(We.prototype.onPrevious=function(){this.previousPage.emit(null)},We.prototype.onNext=function(){this.nextPage.emit(null)},We.decorators=[{type:g.Component,args:[{selector:"xuilib-pagination",template:'<nav class="hmcts-pagination" id="pagination-label">\n\n <p class="govuk-visually-hidden" aria-labelledby="pagination-label">Pagination navigation</p>\n\n <ul class="hmcts-pagination__list">\n <li class="hmcts-pagination__item hmcts-pagination__item--prev">\n <a *ngIf="firstRecord > 1; else noPrevious" class="hmcts-pagination__link" (click)="onPrevious()" href="javascript:void(0)">\n Previous page\n </a>\n <ng-template #noPrevious>\n <span class="hmcts-pagination__link">Previous page</span>\n </ng-template>\n </li>\n\n <li class="hmcts-pagination__item hmcts-pagination__item--next">\n <a *ngIf="moreItems; else noNext" class="hmcts-pagination__link" (click)="onNext()" href="javascript:void(0)">Next page</a>\n <ng-template #noNext>\n <span class="hmcts-pagination__link">Next page</span>\n </ng-template>\n </li>\n </ul>\n</nav>\n',styles:["span.hmcts-pagination__link:hover{color:revert}"]}]}],We.ctorParameters=function(){return[]},We.propDecorators={moreItems:[{type:g.Input}],firstRecord:[{type:g.Input}],previousPage:[{type:g.Output}],nextPage:[{type:g.Output}]},We);function We(){this.previousPage=new g.EventEmitter,this.nextPage=new g.EventEmitter}var He=(Object.defineProperty($e.prototype,"xuilibFeatureToggle",{set:function(e){this.feature=e,this.updateSubscription()},enumerable:!0,configurable:!0}),$e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},$e.prototype.updateSubscription=function(){var t=this;this.subscription=this.service.isEnabled(this.feature).subscribe(function(e){e?t.viewContainer.createEmbeddedView(t.templateRef):t.viewContainer.clear()})},$e.decorators=[{type:g.Directive,args:[{selector:"[xuilibFeatureToggle]"}]}],$e.ctorParameters=function(){return[{type:X},{type:g.ViewContainerRef},{type:g.TemplateRef}]},$e.propDecorators={xuilibFeatureToggle:[{type:g.Input}]},$e);function $e(e,t,n){this.service=e,this.viewContainer=t,this.templateRef=n}var qe=function(){this.$implicit=null,this.xuilibLet=null},Je=(Object.defineProperty(Ke.prototype,"xuilibLet",{set:function(e){this.context.$implicit=this.context.xuilibLet=e},enumerable:!0,configurable:!0}),Ke.decorators=[{type:g.Directive,args:[{selector:"[xuilibLet]"}]}],Ke.ctorParameters=function(){return[{type:g.ViewContainerRef},{type:g.TemplateRef}]},Ke.propDecorators={xuilibLet:[{type:g.Input}]},Ke);function Ke(e,t){this.viewContainer=e,this.context=new qe,this.viewContainer.createEmbeddedView(t,this.context)}var Ye=(Qe.decorators=[{type:g.Component,args:[{selector:"exui-page-wrapper",template:'<div class="page">\n <a *ngIf="backLink" [routerLink]="backLink" class="govuk-back-link">Back</a>\n <div class="govuk-width-container">\n <main id="content" role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <h1 *ngIf="title" class="govuk-heading-xl">\n <span *ngIf="fnTitle" class="govuk-caption-xl">{{fnTitle}}</span>\n {{title}}\n </h1>\n <ng-content>\n\n </ng-content>\n </div>\n </main>\n </div>\n</div>\n',styles:[".page{width:100%}"]}]}],Qe.ctorParameters=function(){return[]},Qe.propDecorators={backLink:[{type:g.Input}],title:[{type:g.Input}],fnTitle:[{type:g.Input}]},Qe);function Qe(){}var Xe=function(e){var t=[];return e.forEach(function(e){t=t.concat(e.caseworkers)}),t},Ze=function(e){return e+"-caseworkers"},et=(tt.prototype.find=function(e){var t=this,n=this.sessionStorageService.getItem("userDetails");return n&&!e.userIncluded&&(n=JSON.parse(n),this.userId=n.id||n.uid),this.assignedUser=e.assignedUser||null,this.http.post("/workallocation/findPerson",{searchOptions:e}).pipe(m.map(function(e){return e.filter(function(e){return![t.assignedUser,t.userId].includes(e.id)})}))},tt.prototype.findCaseworkers=function(t){var n=this,e=this.sessionStorageService.getItem("userDetails");e&&(o=JSON.parse(e),this.userId=o.id||o.uid),this.assignedUser=t.assignedUser||null;var o=t.services,i=[],s=[],r=[];if(o.forEach(function(e){var t=Ze(e);n.sessionStorageService.getItem(t)?(i.push(e),r.push({service:e,caseworkers:JSON.parse(n.sessionStorageService.getItem(t))})):s.push(e)}),i.length!==o.length)return this.http.post("/workallocation/retrieveCaseWorkersForServices",{fullServices:o}).pipe(m.tap(function(e){e.forEach(function(e){s.includes(e.service)&&function(e,t,n){e=Ze(e);n.setItem(e,JSON.stringify(t))}(e.service,e.caseworkers,n.sessionStorageService)})}),m.map(function(e){e=Xe(e);return n.searchInCaseworkers(e,t)}));o=Xe(r);return h.of(this.searchInCaseworkers(o,t))},tt.prototype.mapCaseworkers=function(e,n){var o=[];return e.forEach(function(e){var t={email:e.email,name:e.firstName+" "+e.lastName,id:e.idamId,domain:e.roleCategory===Oe.CASEWORKER?De.CASEWORKER:De.ADMIN};e.roleCategory!==n&&n!==Oe.ALL||o.push(t)}),o},tt.prototype.searchInCaseworkers=function(e,t){var n=this,o=Oe.ALL;t.userRole!==De.ALL&&(t.userRole===De.CASEWORKER?o=Oe.CASEWORKER:t.userRole===De.ADMIN?o=Oe.ADMIN:t.userRole===De.CTSC&&(o=Oe.CTSC));var i=t&&t.searchTerm?t.searchTerm.toLowerCase():"",o=(e?this.mapCaseworkers(e,o):[]).filter(function(e){return e&&e.name&&e.name.toLowerCase().includes(i)});return t.userIncluded?o.filter(function(e){return e&&e.id!==n.assignedUser}):o.filter(function(e){return e&&e.id!==n.userId&&e.id!==n.assignedUser})},tt.prototype.searchJudicial=function(e,t){return this.http.post("api/prd/judicial/getJudicialUsersSearch",{searchString:e,serviceCode:t})},tt.caseworkersKey="caseworkers",tt.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[{type:s.HttpClient},{type:Ue}]},tt.ngInjectableDef=g.defineInjectable({factory:function(){return new tt(g.inject(s.HttpClient),g.inject(Ue))},token:tt,providedIn:"root"}),tt);function tt(e,t){this.http=e,this.sessionStorageService=t}var nt=(ot.prototype.ngOnDestroy=function(){this.sub&&this.sub.unsubscribe()},ot.prototype.ngOnInit=function(){var t=this;this.findPersonControl=new d.FormControl(this.selectedPerson),this.findPersonGroup.addControl("findPersonControl",this.findPersonControl),this.sub=this.findPersonControl.valueChanges.pipe(m.tap(function(){return t.showAutocomplete=!1}),m.tap(function(){return t.filteredOptions=[]}),m.debounceTime(300),m.tap(function(e){return"string"==typeof e?t.personSelected.emit(null):void 0}),m.filter(function(e){return e&&e.length>t.minSearchCharacters}),m.switchMap(function(e){return t.filter(e).pipe(m.tap(function(){return t.showAutocomplete=!0}),m.catchError(function(){return t.filteredOptions=[]}))})).subscribe(function(e){t.filteredOptions=e,t.cd.detectChanges()})},ot.prototype.filter=function(e){var n=this,t=this.findPersonService.find({searchTerm:e,userRole:this.domain,services:this.services,userIncluded:this.userIncluded,assignedUser:this.assignedUser}),o=this.findPersonService.findCaseworkers({searchTerm:e,userRole:this.domain,services:this.services,userIncluded:this.userIncluded,assignedUser:this.assignedUser});if(e&&e.length>this.minSearchCharacters)switch(this.domain){case De.JUDICIAL:return t.pipe(m.map(function(e){var t=n.selectedPersons.map(function(e){return e.id});return e.filter(function(e){e=e.id;return!t.includes(e)})}));case De.ALL:return h.zip(t,o).pipe(m.map(function(e){return e[0].concat(e[1])}));case De.CTSC:case De.CASEWORKER:case De.ADMIN:return o;default:return h.of([])}return h.of([])},ot.prototype.onSelectionChange=function(e){this.personSelected.emit(e),this.findPersonControl.setValue(this.getDisplayName(e),{emitEvent:!1,onlySelf:!0})},ot.prototype.getDisplayName=function(e){return e?e.domain===De.JUDICIAL&&e.fullName?e.fullName+" ("+e.email+")":e.email?e.name+" ("+e.email+")":e.name:""},ot.prototype.onInput=function(){this.personFieldChanged.emit()},ot.decorators=[{type:g.Component,args:[{selector:"xuilib-find-person",template:'<h1 class="govuk-heading-l" *ngIf="title && title.length">\n <span class="govuk-caption-l">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class="govuk-form-group" [formGroup]="findPersonGroup"\n [ngClass]="{\'form-group-error\': findPersonGroup.get(\'findPersonControl\').invalid && submitted}">\n <fieldset class="govuk-fieldset" aria-describedby="sub-title-hint">\n <div id="sub-title-hint" class="govuk-hint" *ngIf="subTitle && subTitle.length">\n {{subTitle}}\n </div>\n <span id="validation-error" class="govuk-error-message" *ngIf="findPersonGroup && findPersonGroup.errors">\n <span class="govuk-visually-hidden">Error:</span>{{findPersonGroup.errors.error ? findPersonGroup.errors.error : errorMessage}}\n </span>\n <input id="inputSelectPerson{{idValue}}" type="text" aria-label="select a person"\n formControlName="findPersonControl"\n [matAutocomplete]="auto"\n class="govuk-input govuk-!-width-one-third"\n [placeholder]="placeholderContent"\n [attr.disabled]="disabled"\n (input)="onInput()">\n <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onSelectionChange($event.option.value)">\n <mat-option *ngFor="let option of filteredOptions"\n [value]="option"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete, \'select-option\': showUpdatedColor}">\n {{getDisplayName(option)}}\n </mat-option>\n <mat-option [ngClass]="{\'select-option\': showUpdatedColor}" *ngIf="isNoResultsShown && !filteredOptions.length && showAutocomplete">No results found</mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n',styles:[".mat-option:hover{background:#2596be}.mat-option.select-option:hover{background:#1d70b8;color:#fff}.hide-autocomplete{display:none}"]}]}],ot.ctorParameters=function(){return[{type:et},{type:g.ChangeDetectorRef}]},ot.propDecorators={personSelected:[{type:g.Output}],personFieldChanged:[{type:g.Output}],title:[{type:g.Input}],boldTitle:[{type:g.Input}],subTitle:[{type:g.Input}],domain:[{type:g.Input}],findPersonGroup:[{type:g.Input}],selectedPerson:[{type:g.Input}],submitted:[{type:g.Input}],userIncluded:[{type:g.Input}],assignedUser:[{type:g.Input}],placeholderContent:[{type:g.Input}],isNoResultsShown:[{type:g.Input}],showUpdatedColor:[{type:g.Input}],selectedPersons:[{type:g.Input}],errorMessage:[{type:g.Input}],idValue:[{type:g.Input}],services:[{type:g.Input}],disabled:[{type:g.Input}]},ot);function ot(e,t){this.findPersonService=e,this.cd=t,this.personSelected=new g.EventEmitter,this.personFieldChanged=new g.EventEmitter,this.boldTitle="Find the person",this.subTitle="Type the name of the person and select them.",this.domain=De.ALL,this.findPersonGroup=new d.FormGroup({}),this.submitted=!0,this.userIncluded=!1,this.placeholderContent="",this.isNoResultsShown=!0,this.showUpdatedColor=!1,this.selectedPersons=[],this.errorMessage="You must select a name",this.idValue="",this.services=["IA"],this.disabled=null,this.showAutocomplete=!1,this.filteredOptions=[],this.minSearchCharacters=2}var it=(st.prototype.addService=function(){},st.decorators=[{type:g.Component,args:[{selector:"xuilib-find-service",template:'<div class="service-picker-custom">\n <div class="search-service">\n <div>\n <label id="input-selected-service-label" *ngIf="serviceTitle">{{serviceTitle}}</label>\n </div>\n <exui-search-service class="search-service"\n [services]="services"\n [selectedServices]="selectedServices"\n [delay]="300"\n [disabled]="disabled"></exui-search-service>\n <a href="javascript:void(0)" (click)="addService()" class="govuk-button govuk-button--secondary govuk-!-margin-bottom-0"\n data-module="govuk-button" *ngIf="enableAddServiceButton" id="add-service">\n Add\n </a>\n </div>\n <ul class="hmcts-filter-tags selection-container" *ngIf="field.maxSelected != 1">\n <li class="service-selection" *ngFor="let selection of selectedServices">\n <a class="hmcts-filter__tag" href="javascript:void(0)">\n {{ selection.name }}\n </a>\n </li>\n </ul>\n </div>\n',styles:["#add-service{background-color:#ddd}"]}]}],st.propDecorators={field:[{type:g.Input}],fields:[{type:g.Input}],serviceTitle:[{type:g.Input}],form:[{type:g.Input}],services:[{type:g.Input}],selectedServices:[{type:g.Input}],disabled:[{type:g.Input}],enableAddServiceButton:[{type:g.Input}],disableInputField:[{type:g.Input}]},st);function st(){this.serviceTitle="Search for a service by name",this.enableAddServiceButton=!0,this.disableInputField=!1}var rt=(at.prototype.getTaskName=function(){var t=this;if(this.sessionStorageService.getItem(at.taskNamesKey)){var e=JSON.parse(this.sessionStorageService.getItem(at.taskNamesKey));return h.of(e)}return this.http.get("/workallocation/taskNames").pipe(m.tap(function(e){return t.sessionStorageService.setItem(at.taskNamesKey,JSON.stringify(e))}))},at.taskNamesKey="taskNames",at.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],at.ctorParameters=function(){return[{type:s.HttpClient},{type:Ue}]},at.ngInjectableDef=g.defineInjectable({factory:function(){return new at(g.inject(s.HttpClient),g.inject(Ue))},token:at,providedIn:"root"}),at);function at(e,t){this.http=e,this.sessionStorageService=t}var lt=(ct.prototype.ngOnDestroy=function(){this.sub&&this.sub.unsubscribe()},ct.prototype.ngOnChanges=function(){var t=this;this.findTaskNameControl=new d.FormControl(this.selectedTaskName),this.findTaskNameGroup.addControl("findTaskNameControl",this.findTaskNameControl),this.sub=this.findTaskNameControl.valueChanges.pipe(m.tap(function(){return t.showAutocomplete=!1}),m.tap(function(){return t.filteredOptions=[]}),m.tap(function(e){return t.searchTerm=e}),m.debounceTime(300),m.tap(function(e){return e||t.taskNameSelected.emit(""),e}),m.filter(function(e){return e&&e.length>=t.minSearchCharacters}),m.mergeMap(function(){return t.getTaskName()})).subscribe(function(e){t.filteredOptions=e.map(function(e){return e.taskName}),t.searchTerm&&(t.filteredOptions=t.filteredOptions.filter(function(e){return e.toLocaleLowerCase().includes(t.searchTerm.toLocaleLowerCase())}).map(function(e){return e})),t.cd.detectChanges()})},ct.prototype.getTaskName=function(){return this.taskService.getTaskName()},ct.prototype.onSelectionChange=function(e){e&&(this.taskNameSelected.emit(e),this.findTaskNameControl.setValue(e))},ct.prototype.onInput=function(){this.taskNameFieldChanged.emit()},ct.decorators=[{type:g.Component,args:[{selector:"xuilib-find-task-name",template:'<h1 class="govuk-heading-l" *ngIf="title && title.length">\n <span class="govuk-caption-l">{{title}}</span>\n {{boldTitle}}\n</h1>\n<div class="govuk-form-group" [formGroup]="findTaskNameGroup"\n [ngClass]="{\'form-group-error\': findTaskNameGroup.get(\'findTaskNameControl\')?.invalid && submitted}">\n <fieldset class="govuk-fieldset" aria-describedby="sub-title-hint">\n <div id="sub-title-hint" class="govuk-hint" *ngIf="subTitle && subTitle.length">\n {{subTitle}}\n </div>\n <span id="validation-error" class="govuk-error-message" *ngIf="findTaskNameGroup && findTaskNameGroup.errors">\n <span class="govuk-visually-hidden">Error:</span>{{findTaskNameGroup.errors.error ? findTaskNameGroup.errors.error : errorMessage}}\n </span>\n <input id="inputSelectTaskName{{idValue}}" type="text" aria-label="select a task name"\n formControlName="findTaskNameControl"\n [matAutocomplete]="auto"\n class="govuk-input govuk-!-width-one-third"\n [placeholder]="placeholderContent"\n [attr.disabled]="disabled"\n (input)="onInput()">\n <mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onSelectionChange($event.option.value)">\n <mat-option *ngFor="let option of filteredOptions"\n [value]="option"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete, \'select-option\': showUpdatedColor}">\n {{ option }}\n </mat-option>\n <mat-option [ngClass]="{\'select-option\': showUpdatedColor}" *ngIf="isNoResultsShown && !filteredOptions.length && showAutocomplete">No results found</mat-option>\n </mat-autocomplete>\n </fieldset>\n</div>\n',styles:[""]}]}],ct.ctorParameters=function(){return[{type:g.ChangeDetectorRef},{type:rt}]},ct.propDecorators={taskNameSelected:[{type:g.Output}],taskNameFieldChanged:[{type:g.Output}],title:[{type:g.Input}],boldTitle:[{type:g.Input}],subTitle:[{type:g.Input}],domain:[{type:g.Input}],findTaskNameGroup:[{type:g.Input}],selectedTaskName:[{type:g.Input}],submitted:[{type:g.Input}],userIncluded:[{type:g.Input}],assignedUser:[{type:g.Input}],placeholderContent:[{type:g.Input}],isNoResultsShown:[{type:g.Input}],showUpdatedColor:[{type:g.Input}],selectedTaskNames:[{type:g.Input}],errorMessage:[{type:g.Input}],idValue:[{type:g.Input}],services:[{type:g.Input}],disabled:[{type:g.Input}]},ct);function ct(e,t){this.cd=e,this.taskService=t,this.taskNameSelected=new g.EventEmitter,this.taskNameFieldChanged=new g.EventEmitter,this.boldTitle="Find the task name",this.subTitle="Type the name of the task name and select them.",this.domain=De.ALL,this.findTaskNameGroup=new d.FormGroup({}),this.submitted=!0,this.userIncluded=!1,this.placeholderContent="",this.isNoResultsShown=!0,this.showUpdatedColor=!1,this.selectedTaskNames=[],this.errorMessage="You must select a name",this.idValue="",this.services=["IA"],this.disabled=null,this.showAutocomplete=!1,this.filteredOptions=[],this.minSearchCharacters=1,this.searchTerm=""}var ut=(dt.prototype.ngOnInit=function(){var t=this;this.displayedJudicials=[],this.control&&this.formGroup&&this.formGroup.controls&&(this.formGroup.controls.selectedFormControl=this.control,this.formGroup.controls.formControl.setValue(this.getControlValueDisplayText())),this.keyUpSubject$.pipe(m.debounceTime(500)).subscribe(function(e){return t.search(e)})},dt.prototype.onKeyDown=function(){this.judicialChanged.emit()},dt.prototype.onKeyUp=function(e){this.showAutocomplete=!1,this.keyUpSubject$.next(e.target.value)},dt.prototype.onFocus=function(){this.showAutocomplete=!1},Object.defineProperty(dt.prototype,"displayedJudicialsDuplicationFiltered",{get:function(){var t=this;return this.displayedJudicials.filter(function(e){return!t.selectedJudicials.map(function(e){return e.idamId}).includes(e.idamId)})},enumerable:!0,configurable:!0}),dt.prototype.filter=function(t){var n=this;this.searchJudicials(t,this.serviceId).pipe(m.mergeMap(function(e){e=e.filter(function(e){return!n.selectedJudicials.map(function(e){return e.idamId}).includes(e.idamId)});return n.displayedJudicials=e,n.searchInProgress=!1,e})).subscribe(function(e){t===e.fullName&&(n.formGroup.controls.selectedFormControl.setValue(e),n.displayedJudicials=[],n.judicialChanged.emit(e),n.showAutocomplete=!1),n.searchInProgress=!1})},dt.prototype.onSelectionChange=function(e){this.formGroup.controls.formControl instanceof d.FormArray?this.formGroup.controls.selectedFormControl.push(new d.FormControl(e.idamId)):this.formGroup.controls.selectedFormControl.setValue(e),this.judicialChanged.emit(e)},dt.prototype.search=function(e){this.searchInProgress=!0,this.showAutocomplete=!!e&&e.length>=this.minSearchCharacters,e?this.formGroup.controls.selectedFormControl.markAsDirty():this.formGroup.controls.selectedFormControl.reset(),this.showAutocomplete?this.filter(e):this.searchInProgress=!1},dt.prototype.getDisplayName=function(e){return e.fullName+" ("+e.emailId+")"},dt.prototype.searchJudicials=function(e,t){return this.judicialService.searchJudicial(e,t)},dt.prototype.getControlValueDisplayText=function(){return this.formGroup&&this.formGroup.controls&&this.formGroup.controls.selectedFormControl.value?this.getDisplayName(this.formGroup.controls.selectedFormControl.value):""},dt.decorators=[{type:g.Component,args:[{selector:"xuilib-search-judicials",template:'<div class="govuk-form-group">\n <input id="inputSelectPerson{{idValue}}" [placeholder]="placeholderContent" [formControl]="formGroup.controls.formControl"\n [matAutocomplete]="autoComplete" (keydown)="onKeyDown()" (keyup)="onKeyUp($event)" (focus)="onFocus()"\n class="govuk-input" [attr.disabled]="!disabled ? null: disabled" [value]="getControlValueDisplayText()"\n #inputSelection>\n <mat-autocomplete autoActiveFirstOption #autoComplete="matAutocomplete">\n <mat-option *ngFor="let judicial of displayedJudicialsDuplicationFiltered" class="select-option"\n [value]="getDisplayName(judicial)" (onSelectionChange)="onSelectionChange(judicial)"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete}">\n {{ getDisplayName(judicial) }}\n </mat-option>\n <mat-option class="select-option"\n *ngIf="!displayedJudicialsDuplicationFiltered?.length && showAutocomplete && !searchInProgress">\n {{ \'No results found\' }}</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".hide-autocomplete{display:none}.mat-option:hover{background:#2596be}.mat-option.select-option:hover{background:#1d70b8;color:#fff}"]}]}],dt.ctorParameters=function(){return[{type:et},{type:d.FormBuilder}]},dt.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],selectedJudicials:[{type:g.Input}],submitted:[{type:g.Input}],placeholderContent:[{type:g.Input}],showAutocomplete:[{type:g.Input}],displayedJudicials:[{type:g.Input}],judicialChanged:[{type:g.Output}],idValue:[{type:g.Input}],errorMessage:[{type:g.Input}],serviceId:[{type:g.Input}],autoCompleteInputBox:[{type:g.ViewChild,args:["inputSelection",{read:g.ElementRef}]}]},dt);function dt(e,t){this.judicialService=e,this.disabled=null,this.selectedJudicials=[],this.submitted=!0,this.placeholderContent="",this.showAutocomplete=!1,this.judicialChanged=new g.EventEmitter,this.idValue="",this.errorMessage="You must select a name",this.serviceId="",this.minSearchCharacters=3,this.keyUpSubject$=new h.Subject,this.searchInProgress=!1,this.formGroup=t.group({formControl:[null],selectedFormControl:[null]})}var pt=(gt.prototype.onInput=function(){},gt.prototype.onSelectionChanged=function(t){var e=this.services.find(function(e){return e.key===t});this.serviceChanged.emit(e)},gt.decorators=[{type:g.Component,args:[{selector:"exui-search-service",template:'<div class="auto-complete-container">\n <input\n id="inputServiceSearch"\n (input)="onInput()"\n [formControl]="form?.controls.searchTerm"\n [matAutocomplete]="autoSearchService"\n class="govuk-input"\n [attr.disabled]="disabled"\n (change)="onSelectionChanged($event.target.value)">\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchService="matAutocomplete">\n <mat-option *ngFor="let service of services" (onSelectionChange)="onSelectionChanged($event.target.value)">\n {{ service.name }}\n </mat-option>\n <mat-option *ngIf="!services?.length && showAutocomplete && term && term.length >= this.minSearchCharacters">No results found</mat-option>\n </mat-autocomplete>\n</div>\n',styles:[".autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:250px;display:inline-block;margin-right:4px}.autocomplete__input{line-height:24px;font-size:19px}"]}]}],gt.propDecorators={services:[{type:g.Input}],selectedServices:[{type:g.Input}],disabled:[{type:g.Input}],delay:[{type:g.Input}],form:[{type:g.Input}],showAutocomplete:[{type:g.Input}],serviceChanged:[{type:g.Output}]},gt);function gt(){this.services=[],this.showAutocomplete=!1,this.serviceChanged=new g.EventEmitter,this.minSearchCharacters=3,this.term=""}var ht=(mt.prototype.ngAfterContentInit=function(){this.readyAfterContent=!0},mt.prototype.ngOnInit=function(){var t=this;this.displayedLocations=[],this.control&&this.findLocationFormGroup&&this.findLocationFormGroup.controls&&(this.findLocationFormGroup.controls.locationSelectedFormControl=this.control),this.keyUpSubject$.pipe(m.debounceTime(500)).subscribe(function(e){return t.search(e)})},mt.prototype.onKeyDown=function(){this.locationChanged.emit()},mt.prototype.onKeyUp=function(e){this.showAutocomplete=!1,this.keyUpSubject$.next(e.target.value)},mt.prototype.onFocus=function(){this.showAutocomplete=!1},Object.defineProperty(mt.prototype,"displayedLocationsDuplicationFiltered",{get:function(){var t=this;return this.displayedLocations.filter(function(e){return!t.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)&&e.court_name})},enumerable:!0,configurable:!0}),mt.prototype.filter=function(t){var n=this;this.searchLocations(t).pipe(m.mergeMap(function(e){e=e.filter(function(e){return!n.selectedLocations.map(function(e){return e.epimms_id}).includes(e.epimms_id)});return n.displayedLocations=e,n.searchInProgress=!1,e})).subscribe(function(e){t===e.court_name&&(n.findLocationFormGroup.controls.locationSelectedFormControl.setValue(e),n.displayedLocations=[],n.locationChanged.emit(e),n.showAutocomplete=!1),n.searchInProgress=!1})},mt.prototype.onSelectionChange=function(e){this.findLocationFormGroup.controls.findLocationFormControl instanceof d.FormArray?this.findLocationFormGroup.controls.locationSelectedFormControl.push(new d.FormControl(e.epimms_id)):this.findLocationFormGroup.controls.locationSelectedFormControl.setValue(e),this.locationChanged.emit(e)},mt.prototype.search=function(e){this.searchInProgress=!0,this.showAutocomplete=!!e&&e.length>=this.minSearchCharacters,e&&e.length||(this.findLocationFormGroup.controls.locationSelectedFormControl.markAsPristine(),this.findLocationFormGroup.controls.locationSelectedFormControl.reset()),this.showAutocomplete?this.filter(e):this.searchInProgress=!1},mt.prototype.getDisplayName=function(e){return e.court_name},mt.prototype.searchLocations=function(e){return this.locationService.searchLocations(this.serviceIds,this.locationType,e)},mt.prototype.getControlCourtNameValue=function(){return this.findLocationFormGroup&&this.findLocationFormGroup.controls&&this.findLocationFormGroup.controls.locationSelectedFormControl.value?this.findLocationFormGroup.controls.locationSelectedFormControl.value.court_name:""},mt.decorators=[{type:g.Component,args:[{selector:"xuilib-search-venue",template:'<div class="auto-complete-container">\n <div *ngIf="readyAfterContent" class="autocomplete__wrapper">\n <input\n [formControl]="findLocationFormGroup.controls.findLocationFormControl"\n [matAutocomplete]="autoSearchLocation"\n (keydown)="onKeyDown()"\n (keyup)="onKeyUp($event)"\n (focus)="onFocus()"\n class="autocomplete__input autocomplete__input--default search-box"\n [attr.disabled]="!disabled ? null: disabled"\n [value]="getControlCourtNameValue()"\n #inputSelectedLocation>\n <mat-autocomplete class="mat-autocomplete-panel-extend" autoActiveFirstOption #autoSearchLocation="matAutocomplete">\n <mat-option *ngFor="let location of displayedLocationsDuplicationFiltered"\n [value]="getDisplayName(location)"\n (onSelectionChange)="onSelectionChange(location)"\n [ngClass]="{\'hide-autocomplete\': !showAutocomplete}">\n {{ getDisplayName(location) }}\n </mat-option>\n <mat-option *ngIf="!displayedLocationsDuplicationFiltered?.length && showAutocomplete && !searchInProgress">{{ \'No results found\' }}</mat-option>\n </mat-autocomplete>\n </div>\n</div>\n',styles:[".autocomplete__input{-webkit-appearance:none;border:2px solid #0b0c0c;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%;background-color:transparent;position:relative}.autocomplete__hint{color:#b1b4b6;position:absolute}.autocomplete__input--default{padding:5px}.autocomplete__input--focused{outline:#fd0 solid 3px;outline-offset:0;box-shadow:inset 0 0 0 2px}.autocomplete__input--show-all-values{padding:5px 34px 5px 5px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;right:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#0b0c0c;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:rgba(0,0,0,.256863) 0 2px 6px;left:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-bottom:solid #b1b4b6;border-width:1px 0;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#1d70b8;border-color:#1d70b8;color:#fff;outline:0}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:5px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:13px;line-height:1.31579}}.div-action{display:inline-block}.add-location{display:inline}.remove-location-button{margin:5px}.hide-autocomplete{display:none}.auto-complete-container{min-width:550px;display:inline-block;margin-right:4px}"]}]}],mt.ctorParameters=function(){return[{type:Me},{type:d.FormBuilder}]},mt.propDecorators={control:[{type:g.Input}],disabled:[{type:g.Input}],locationType:[{type:g.Input}],selectedLocations:[{type:g.Input}],serviceIds:[{type:g.Input}],submitted:[{type:g.Input}],autoCompleteInputBox:[{type:g.ViewChild,args:["inputSelectedLocation",{read:g.ElementRef}]}],showAutocomplete:[{type:g.Input}],displayedLocations:[{type:g.Input}],locationChanged:[{type:g.Output}]},mt);function mt(e,t){this.locationService=e,this.disabled=null,this.locationType="",this.serviceIds="",this.submitted=!0,this.showAutocomplete=!1,this.locationChanged=new g.EventEmitter,this.minSearchCharacters=3,this.keyUpSubject$=new h.Subject,this.readyAfterContent=!1,this.searchInProgress=!1,this.findLocationFormGroup=t.group({findLocationFormControl:[null],locationSelectedFormControl:[null]}),this.selectedLocations=[]}var ft=(vt.prototype.ngOnInit=function(){var e=this.config.focusOn||this.config.value;this.config.id=e,this.config.classes=this.config.classes?this.config.classes.concat(" govuk-checkboxes__label"):"govuk-checkboxes__label"},vt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-checkbox",template:'<div class="govuk-checkboxes__item" [formGroup]="group">\n <input class="govuk-checkboxes__input" type="checkbox" [attr.aria-describedby]="config.hint ? config.value+\'-item-hint\' : null"\n [id]="config.id" [name]="config.name" [formControlName]="config.value" [checked]="isChecked">\n <xuilib-gov-label appRemoveHost [config]="config"></xuilib-gov-label>\n <span [id]="config.value+\'-item-hint\'" class="govuk-hint govuk-checkboxes__hint">\n {{config.hint}}\n </span>\n</div>'}]}],vt.ctorParameters=function(){return[]},vt.propDecorators={group:[{type:g.Input}],config:[{type:g.Input}],isChecked:[{type:g.Input}]},vt);function vt(){this.isChecked=!1}var bt=(yt.setDescribedBy=function(e,t){return e&&e&&e.isInvalid?t.hint?t.id+"-hint "+t.id+"-error":t.id+"-error":t.hint?t.id+"-hint":null},yt);function yt(){}var kt=(Ct.prototype.ngOnInit=function(){this.columns=this.setColumns()},Ct.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Ct.prototype.onChecked=function(e,t){var n=this.group.get(this.config.name),o=n.value||[];e?n.setValue(C(o,[t])):(o=o.filter(function(e){return e!==t}),n.setValue(o))},Ct.prototype.isChecked=function(e){var t=this.group.get(this.config.name);return t.value&&t.value.includes(e)},Ct.prototype.setColumns=function(){if(this.config.rows&&1<this.config.rows){for(var e=[],t=0;t<this.items.length;t+=this.config.rows){var n=this.items.slice(t,t+this.config.rows);e.push(n)}return e}return[this.items]},Ct.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-checkboxes",template:'<div class="govuk-form-group gov-uk-input" [formGroup]="group"\n [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n\n <xuilib-gov-label [config]="config"></xuilib-gov-label>\n\n <span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n </span>\n\n <xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n <div class="govuk-checkboxes govuk-checkboxes--small govuk-checkboxes-multi-column" data-module="govuk-checkboxes">\n <div class="govuk-checkboxes-multi-column__single" *ngFor="let columnItems of columns">\n <div class="govuk-checkboxes__item" *ngFor="let item of columnItems">\n <input type="checkbox" class="govuk-checkboxes__input"\n [id]="item.id" [name]="item.id" [checked]="isChecked(item.value)" [value]="item.value"\n [attr.aria-describedby]="setDescribedBy()"\n (change)="onChecked($event.target.checked, item.value)"\n >\n <label class="govuk-label govuk-checkboxes__label" [for]="item.id">\n {{ item.label }}\n </label>\n <div *ngIf="item.hint" class="govuk-hint govuk-checkboxes__hint">\n {{ item.hint }}\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[".govuk-checkboxes-multi-column{display:flex;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.govuk-checkboxes-multi-column__single{padding-left:20px;padding-right:20px}"]}]}],Ct.propDecorators={group:[{type:g.Input}],config:[{type:g.Input}],items:[{type:g.Input}],errorMessage:[{type:g.Input}]},Ct);function Ct(){}var It=(wt.prototype.ngOnInit=function(){this.day=this.config.id+"_day",this.month=this.config.id+"_month",this.year=this.config.id+"_year";var e=this.DateValidator();this.formGroup.get(this.day).setValidators(e)},wt.prototype.isValidDate=function(e,t,n){var o=!isNaN(e.getTime()),t=e.getMonth()===t,n=e.getFullYear()===n;return o&&t&&n},wt.prototype.isEmpty=function(e){return null==e||""===e||isNaN(e)||e<0},wt.prototype.DateValidator=function(){var o=this;return function(){var e=o.formGroup.get(o.day).value,t=o.formGroup.get(o.month).value-1,n=o.formGroup.get(o.year).value;return o.isOptional&&o.isEmpty(e)&&o.isEmpty(t)&&o.isEmpty(n)||o.isValidDate(new Date(n,t,e),t,+n)?null:{dateComponent:!0}}},wt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-date",template:'<div class="govuk-form-group" [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}" [formGroup]="formGroup">\n <div class="date-input-container">\n <xuilib-gov-uk-fieldset\n [config]="{\n legend: config.label || \'Date component\',\n classes: config.classes || \'govuk-label--m\',\n id: config.id,\n hint: config.hint != null ? config.hint : \'For example, 12 11 2007\',\n isPageHeading: config.isPageHeading || false}"\n [errorMessage]="errorMessage">\n <xuilib-gov-uk-error-message\n [config]="{id: \'passport\'}"\n *ngIf="errorMessage"\n [errorMessage]="errorMessage">\n </xuilib-gov-uk-error-message>\n <div class="govuk-date-input" [id]="config.id+\'-date\'">\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Day\', name: config.id+\'-day\', id: config.id+\'-day\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-2"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id"\n [name]="config.id+\'-day\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_day\'">\n </div>\n </div>\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Month\', name: config.id+\'-month\', id: config.id+\'-month\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-2"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id+\'-month\'"\n [name]="config.id+\'-month\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_month\'">\n </div>\n </div>\n <div class="govuk-date-input__item">\n <div class="govuk-form-group">\n <xuilib-gov-label\n [config]="{label: \'Year\', name: config.id+\'-year\', id: config.id+\'-year\', classes: \'govuk-date-input__label\'}">\n </xuilib-gov-label>\n <input class="govuk-input govuk-date-input__input govuk-input--width-4"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id+\'-year\'"\n [name]="config.id+\'-year\'" type="number" value="" pattern="[0-9]*"\n [formControlName]="config.id+\'_year\'">\n </div>\n </div>\n </div>\n </xuilib-gov-uk-fieldset>\n </div>\n</div>\n',styles:[".govuk-form-group .date-input-container{margin-bottom:30px}.govuk-form-group .date-input-container .govuk-date-input .govuk-date-input__item .govuk-form-group{margin-bottom:0}"]}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}],formGroup:[{type:g.Input}],isOptional:[{type:g.Input}]},wt);function wt(){this.isOptional=!1}var xt=(_t.decorators=[{type:g.Component,args:[{selector:" xuilib-gov-uk-error-message",template:'<span class="govuk-error-message" [id]="config.id + \'-error\'" *ngFor="let message of errorMessage?.messages">\n <span class="govuk-visually-hidden">Error:</span>{{message}}\n</span>'}]}],_t.ctorParameters=function(){return[]},_t.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}]},_t);function _t(){}var St=(Lt.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Lt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-fieldset",template:'<fieldset class="govuk-fieldset" [attr.aria-describedby]="setDescribedBy()">\n <legend [class]="config.classes + \' govuk-fieldset__legend\'" *ngIf="!config.isPageHeading">\n {{config.legend}}\n </legend>\n\n <legend [class]="config.classes + \' govuk-fieldset__legend\'" *ngIf="config.isPageHeading">\n <h1>{{config.legend}}</h1>\n </legend>\n\n <span [id]="config.id+\'-hint\'" class="govuk-hint" *ngIf="config.hint">\n {{config.hint}}\n </span>\n <ng-content></ng-content>\n</fieldset>'}]}],Lt.ctorParameters=function(){return[]},Lt.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}]},Lt);function Lt(){}var Tt=(Et.prototype.ngOnInit=function(){this.config.classes="govuk-label--m"},Et.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Et.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-file-upload",template:'<div class="govuk-form-group" [formGroup]="group"\n [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n\n <xuilib-gov-label [config]="config"></xuilib-gov-label>\n\n <span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n </span>\n\n <xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n <input class="govuk-file-upload"\n *ngIf="reloadInput"\n [formControlName]="config.id"\n [ngClass]="{\'govuk-file-upload--error\': errorMessage?.isInvalid}"\n [id]="config.id" [name]="config.name"\n [attr.aria-describedby]="setDescribedBy()"\n type="file">\n </div>'}]}],Et.ctorParameters=function(){return[]},Et.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},Et);function Et(){this.reloadInput=!0}var Ft=(At.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-form-group-wrapper",template:'<div class="govuk-form-group" [attr.formGroupName]="group" [ngClass]="{\'govuk-form-group--error\': (error?.isInvalid)}">\n <xuilib-gov-uk-fieldset\n [config]="{legend: config.legend, classes: \'govuk-label--m\', id: config.key, hint: config.hint, isPageHeading: config.isPageHeading}"\n [errorMessage]="error">\n\n <xuilib-gov-uk-error-message [config]="{id: group}" [errorMessage]="error"></xuilib-gov-uk-error-message>\n\n <ng-content></ng-content>\n\n </xuilib-gov-uk-fieldset>\n</div>'}]}],At.ctorParameters=function(){return[]},At.propDecorators={error:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},At);function At(){}var Nt=(Dt.prototype.ngOnInit=function(){this.config.classes="string"==typeof this.config.classes?this.config.classes:"govuk-label govuk-label--m"},Dt.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Dt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-input",template:'<div class="govuk-form-group gov-uk-input" [formGroup]="group"\n[ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n\n<span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n</span>\n\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n<input class="govuk-input"\n [class.govuk-!-width-full]="config.fullWidth"\n [ngClass]="{\'govuk-input--error\': errorMessage?.isInvalid}"\n [id]="config.id"\n [name]="config.name"\n [type]="config.type"\n [attr.aria-invalid]="errorMessage?.isInvalid"\n [formControlName]="config.name"\n [attr.aria-describedby]=\'setDescribedBy()\'>\n</div>\n',styles:[".gov-uk-input input:disabled{background:#b1b4b6}"]}]}],Dt.ctorParameters=function(){return[]},Dt.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}]},Dt);function Dt(){}var Ot=(Mt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-label",template:'<h1 *ngIf="config.isPageHeading else noHeading">\n <label *ngIf="config.label" [for]="config.id" [class]="config.classes + \' govuk-label\'">\n <span>{{ config.label }}</span>\n <span class="govuk-label__optional" *ngIf="config.optional">(optional)</span>\n </label>\n</h1>\n<ng-template #noHeading>\n <label *ngIf="config.label" [for]="config.id" [class]="config.classes + \' govuk-label\'">\n <span>{{ config.label }}</span>\n <span class="govuk-label__optional" *ngIf="config.optional">(optional)</span>\n </label>\n</ng-template>\n',styles:[".govuk-label{display:flex;align-items:center;flex-wrap:wrap}.govuk-label__optional{font-weight:400;font-size:16px;display:inline-block;margin-left:.75rem}"]}]}],Mt.ctorParameters=function(){return[]},Mt.propDecorators={config:[{type:g.Input}]},Mt);function Mt(){}var Pt=(Ut.prototype.ngOnInit=function(){var e=this.config.focusOn||this.config.value;this.config.id=e,this.config.classes=this.config.classes?this.config.classes.concat(" govuk-radios__label"):"govuk-radios__label"},Ut.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-radio",template:'<div class="govuk-radios__item" [formGroup]="group">\n <input [className]="\'govuk-radios__input \' + config.classes"\n [id]="config.id"\n [value]="config.value" type="radio"\n [attr.data-aria-controls]="config.id"\n [name]="config.name"\n [formControl]="group.controls[config.name]">\n <xuilib-gov-label appRemoveHost [config]="config"></xuilib-gov-label>\n</div>'}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={group:[{type:g.Input}],config:[{type:g.Input}]},Ut);function Ut(){}var jt=(Bt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-radios",template:'<xuilib-gov-uk-form-group-wrapper\n[error]="errors"\n[config]="options.config"\n[group]="options.key">\n<div class="govuk-radios">\n <xuilib-gov-radio\n appRemoveHost\n *ngFor="let item of options.items"\n [group]="options.group"\n [config]="item.config">\n </xuilib-gov-radio>\n</div>\n</xuilib-gov-uk-form-group-wrapper>'}]}],Bt.propDecorators={options:[{type:g.Input}],errors:[{type:g.Input}]},Bt);function Bt(){}var Rt=(Vt.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Vt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-select",template:'<div class="govuk-form-group" [formGroup]="group"\n[ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n<span *ngIf="config.hint" [id]="config.id +\'-hint\'" class="govuk-hint">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n\n<select class="govuk-select"\n [class.govuk-!-width-full]="config.fullWidth"\n [id]="config.id" [name]="config.id" [formControlName]="config.id" [attr.aria-describedby]=\'setDescribedBy()\'>\n <option value="{{item.value}}" *ngFor="let item of items">{{item.label}}</option>\n</select>\n</div>\n'}]}],Vt.ctorParameters=function(){return[]},Vt.propDecorators={errorMessage:[{type:g.Input}],group:[{type:g.Input}],config:[{type:g.Input}],items:[{type:g.Input}]},Vt);function Vt(){}var Gt=(zt.prototype.formatDate=function(e){return a.formatDate(e,"dd/MM/yyyy","en-UK")},zt.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-table",template:'<table class="{{\'govuk-table \' + classes}}">\n <caption class="govuk-table__caption">{{caption}}</caption>\n <thead class="govuk-table__head" >\n <tr class="govuk-table__row">\n <th class="govuk-table__header" scope="col" *ngFor="let h of columnConfig">{{h.header}}</th>\n </tr>\n </thead>\n <tbody class="govuk-table__body">\n <tr data-selector="table-row" class="govuk-table__row" *ngFor="let r of rows">\n <ng-container *ngFor="let col of columnConfig; first as isFirst">\n <th data-selector="table-header" class="govuk-table__header" scope="row" *ngIf="isFirst && firstCellIsHeader">\n <ng-container *ngIf="!col.type || col.type === \'text\' || !r.routerLink">{{r[col.key]}}</ng-container>\n <ng-container *ngIf="col.type === \'link\' && r.routerLink">\n <a class="govuk-link" [routerLink]="r.routerLink">{{r[col.key]}}</a>\n </ng-container>\n </th>\n <td data-selector="table-cell" class="govuk-table__cell" *ngIf="!(isFirst && firstCellIsHeader)">\n <ng-container *ngIf="col.type === \'date\'">{{formatDate(r[col.key])}}</ng-container>\n <ng-container *ngIf="!col.type || col.type === \'text\' || !r.routerLink">{{r[col.key]}}</ng-container>\n <ng-container *ngIf="col.type === \'link\' && r.routerLink">\n <a class="govuk-link" [routerLink]="r.routerLink">{{r[col.key]}}</a>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </tbody>\n</table>\n',styles:[""]}]}],zt.ctorParameters=function(){return[]},zt.propDecorators={classes:[{type:g.Input}],caption:[{type:g.Input}],firstCellIsHeader:[{type:g.Input}],rows:[{type:g.Input}],columnConfig:[{type:g.Input}]},zt);function zt(){this.classes="",this.caption="Dates and amounts",this.firstCellIsHeader=!0,this.columnConfig=[{header:"Date",key:"date",type:"text"},{header:"Amount",key:"amount"}]}var Wt=(Ht.prototype.setDescribedBy=function(){return bt.setDescribedBy(this.errorMessage,this.config)},Ht.decorators=[{type:g.Component,args:[{selector:"xuilib-gov-uk-textarea",template:'<div [formGroup]="group" \nclass="govuk-form-group" [ngClass]="{\'govuk-form-group--error\': errorMessage?.isInvalid}">\n<xuilib-gov-label [config]="config"></xuilib-gov-label>\n<span id="more-detail-hint" class="govuk-hint">\n {{config.hint}}\n</span>\n<xuilib-gov-uk-error-message [config]="config" [errorMessage]="errorMessage"></xuilib-gov-uk-error-message>\n<textarea\n class="govuk-textarea" [formControlName]="config.key"\n [ngClass]="{\'govuk-textarea--error\': errorMessage?.isInvalid}"\n [id]="config.id" name="more-detail" [rows]="config.rows" [attr.aria-describedby]="setDescribedBy()"></textarea>\n</div>'}]}],Ht.propDecorators={config:[{type:g.Input}],errorMessage:[{type:g.Input}],group:[{type:g.Input}]},Ht);function Ht(){}var $t=(qt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-banner",template:'<ng-container *ngIf="message && type">\n <div *ngIf="title"\n class="hmcts-banner-title hmcts-banner-title--{{ type }}">\n {{ title }}\n </div>\n <div class="hmcts-banner hmcts-banner--{{ type }}">\n <ng-container *ngIf="showMessageIcon">\n <ng-container [ngSwitch]="type">\n <ng-container *ngSwitchCase="\'warning\'">\n <svg class="hmcts-banner__icon hmcts-banner__icon--warning" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase="\'success\'">\n <svg class="hmcts-banner__icon hmcts-banner__icon--success" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase="\'information\'">\n <svg class="hmcts-banner__icon hmcts-banner__icon--information" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"></path>\n </svg>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <div class="hmcts-banner__message" [class.hmcts-banner__message--bold]="messageBoldText">\n <span class="hmcts-banner__assistive">{{ type }}</span>\n <span class="hmcts-banner__message-text govuk-!-font-weight-bold">{{ message }}</span>\n </div>\n </div>\n</ng-container>\n',styles:[".hmcts-banner-title{color:#fff;background-color:#1d70b8;font-weight:700;padding:10px 15px 5px}.hmcts-banner-title--success{background-color:#00703c}.hmcts-banner-title--warning{background-color:#d4351c}.hmcts-banner__message--bold{font-weight:700}"]}]}],qt.propDecorators={message:[{type:g.Input}],type:[{type:g.Input}],title:[{type:g.Input}],showMessageIcon:[{type:g.Input}],messageBoldText:[{type:g.Input}]},qt);function qt(){this.title="",this.showMessageIcon=!1,this.messageBoldText=!1}var Jt=(Object.defineProperty(Kt.prototype,"errorMessages",{set:function(e){this.messages=e},enumerable:!0,configurable:!0}),Kt.prototype.ngAfterViewInit=function(){this.scrollTo("errorSummary")},Kt.prototype.ngOnChanges=function(e){e.errorMessages&&this.scrollTo("errorSummary")},Kt.prototype.scrollTo=function(e){this.document.querySelector("#"+e)&&this.document.querySelector("#"+e).focus()},Kt.prototype.hasElement=function(e){return this.document.querySelector("#"+e)},Kt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-error-summary",template:'<div *ngIf="!showWarningMessage && messages && messages.length > 0" id="errorSummary" class="govuk-error-summary" aria-labelledby="error-summary-title" role="alert" tabindex="-1"\n data-module="error-summary">\n <h2 class="govuk-error-summary__title" id="error-summary-title">\n {{header}}\n </h2>\n <div class="govuk-error-summary__body">\n <ul class="govuk-list govuk-error-summary__list">\n <li *ngFor="let message of messages">\n <a (click)="scrollTo(message[\'id\'])" [routerLink]="" [fragment]="message[\'id\']"\n *ngIf="hasElement(message[\'id\'])">{{message[\'message\']}}</a>\n <span *ngIf="!hasElement(message[\'id\'])">{{message[\'message\']}}</span>\n </li>\n </ul>\n </div>\n</div>\n<div *ngIf="showWarningMessage" class="hmcts-banner hmcts-banner--warning">\n <svg class="hmcts-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25">\n <path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z" /></svg>\n <div class="hmcts-banner__message">\n <span class="hmcts-banner__assistive">Warning</span>\n <p class="govuk-body" *ngFor="let message of messages">{{ message[\'message\'] }}</p>\n </div>\n</div>'}]}],Kt.ctorParameters=function(){return[{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},Kt.propDecorators={errorMessages:[{type:g.Input}],header:[{type:g.Input}],showWarningMessage:[{type:g.Input}]},Kt);function Kt(e){this.document=e}var Yt=(Object.defineProperty(Qt.prototype,"content",{set:function(e){this.value=e.name},enumerable:!0,configurable:!0}),Qt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-identity-bar",template:'<div class="hmcts-identity-bar" *ngIf="value">\n\n <div class="hmcts-identity-bar__container">\n\n <div class="hmcts-identity-bar__details">\n \n <span class="hmcts-identity-bar__title">{{value}}</span>\n \n </div> \n\n </div>\n\n</div>',styles:[""]}]}],Qt.ctorParameters=function(){return[]},Qt.propDecorators={content:[{type:g.Input}]},Qt);function Qt(){}var Xt=(Object.defineProperty(Zt.prototype,"banner",{set:function(e){this.bannerData=e},enumerable:!0,configurable:!0}),Zt.prototype.ngOnInit=function(){this.hasBackLink=this.backLink!==undefined||0<this.backEvent.observers.length},Zt.prototype.onGoBack=function(){this.backEvent.emit()},Zt.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-main-wrapper",template:'<a *ngIf="hasBackLink" [routerLink]="backLink" (click)="onGoBack()" class="govuk-back-link">Back</a>\n<main id="content" role="main" class="govuk-main-wrapper">\n <div class="govuk-grid-row">\n <div class="govuk-grid-column-two-thirds">\n <xuilib-hmcts-error-summary\n *ngIf="summaryErrors && !summaryErrors.isFromValid"\n [errorMessages]="summaryErrors.items"\n [header]="summaryErrors.header"\n [showWarningMessage]="showWarningMessage">\n </xuilib-hmcts-error-summary>\n <xuilib-hmcts-banner *ngIf="bannerData"\n [type]="bannerData.type"\n [message]="bannerData.message"\n ></xuilib-hmcts-banner>\n <h1 *ngIf="title" class="govuk-heading-xl">{{title}}</h1>\n <ng-content></ng-content>\n </div>\n <div class="govuk-grid-column-one-third" *ngIf="actionButtons?.length > 0">\n <div class="hmcts-page-heading__actions-wrapper">\n <a\n *ngFor="let actionButton of actionButtons"\n (click)="actionButton.action()"\n role="button"\n draggable="false"\n class="govuk-button {{ actionButton.class }}"\n >{{ actionButton.name }}</a>\n </div>\n </div>\n </div>\n</main>\n'}]}],Zt.ctorParameters=function(){return[]},Zt.propDecorators={backLink:[{type:g.Input}],title:[{type:g.Input}],summaryErrors:[{type:g.Input}],banner:[{type:g.Input}],actionButtons:[{type:g.Input}],showWarningMessage:[{type:g.Input}],backEvent:[{type:g.Output}]},Zt);function Zt(){this.backEvent=new g.EventEmitter}var en=(tn.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-pagination",template:'<pagination-template #p="paginationApi" [id]="id" [maxSize]="maxSize" (pageChange)="pageChange.emit($event)"\n (pageBoundsCorrection)="pageBoundsCorrection.emit($event)">\n\n <nav class="hmcts-pagination" id="pagination-label">\n <p class="govuk-visually-hidden" aria-labelledby="pagination-label">Pagination navigation</p>\n <ul class="hmcts-pagination__list" *ngIf="!(p.pages.length <= 1)">\n\n <li class="hmcts-pagination__item hmcts-pagination__item--prev" [class.disabled]="p.isFirstPage()">\n <a [routerLink]="" class="hmcts-pagination__link" *ngIf="1 < p.getCurrent()" (keyup.enter)="p.previous()"\n (click)="p.previous()">Previous <span class="govuk-visually-hidden">set of pages</span></a>\n </li>\n\n <ng-container *ngIf="showPageNumbers">\n <li class="hmcts-pagination__item" [class.hmcts-pagination__item--active]="p.getCurrent() === page.value"\n [class.hmcts-pagination__item--dots]="page.label === \'...\'" *ngFor="let page of p.pages">\n <a class="hmcts-pagination__link" [routerLink]="" (keyup.enter)="p.setCurrent(page.value)"\n (click)="p.setCurrent(page.value)" *ngIf="p.getCurrent() !== page.value">\n <span class="govuk-visually-hidden">page </span>\n <span>{{ (page.label === \'...\') ? page.label : (page.label | number:\'\') }}</span>\n </a>\n <ng-container *ngIf="p.getCurrent() === page.value">\n <span>{{ (page.label === \'...\') ? page.label : (page.label | number:\'\') }}</span>\n </ng-container>\n </li>\n </ng-container>\n\n <li class="hmcts-pagination__item hmcts-pagination__item--next" [class.disabled]="p.isLastPage()">\n <a [routerLink]="" class="hmcts-pagination__link" *ngIf="!p.isLastPage()" (keyup.enter)="p.next()"\n (click)="p.next()">Next<span class="govuk-visually-hidden"> page</span></a>\n </li>\n\n </ul>\n <p class="hmcts-pagination__results" *ngIf="showResultCount">Showing <b>{{(p.getCurrent() * pageSize) - pageSize + 1}}</b>\n to <b>{{ p.getCurrent() * pageSize > p.getTotalItems() ? p.getTotalItems() : p.getCurrent() *\n pageSize}}</b> of <b>{{p.getTotalItems()}}</b> results</p>\n </nav>\n\n</pagination-template>',styles:[".hmcts-pagination__results{float:right}"]}]}],tn.propDecorators={id:[{type:g.Input}],maxSize:[{type:g.Input}],pageSize:[{type:g.Input}],showPageNumbers:[{type:g.Input}],showResultCount:[{type:g.Input}],pageChange:[{type:g.Output}],pageBoundsCorrection:[{type:g.Output}]},tn);function tn(){this.maxSize=7,this.pageSize=10,this.showPageNumbers=!0,this.showResultCount=!0,this.pageChange=new g.EventEmitter,this.pageBoundsCorrection=new g.EventEmitter}var nn=(Object.defineProperty(on.prototype,"userLoggedIn",{set:function(e){this.isUserLoggedIn=e},enumerable:!0,configurable:!0}),on.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-primary-navigation",template:'<nav *ngIf="isUserLoggedIn" class="hmcts-primary-navigation" [attr.aria-label]="label">\n <div class="hmcts-primary-navigation__container">\n <div class="govuk-header__logo" *ngIf="isBrandedHeader"></div>\n <ul class="hmcts-primary-navigation__list">\n <li class="hmcts-primary-navigation__item" *ngFor="let item of items">\n <a class="hmcts-primary-navigation__link" [attr.aria-current]="item.active ? true: null" [routerLink]="item.href" [innerHTML]="item.text"></a>\n </li>\n </ul>\n </div>\n</nav>\n',styles:[""]}]}],on.ctorParameters=function(){return[]},on.propDecorators={userLoggedIn:[{type:g.Input}],label:[{type:g.Input}],items:[{type:g.Input}],isBrandedHeader:[{type:g.Input}]},on);function on(){}var sn=(rn.decorators=[{type:g.Component,args:[{selector:"xuilib-hmcts-sub-navigation",template:'<nav class="hmcts-sub-navigation" attr.aria-label="{{label}}" role="navigation" *ngIf="items">\n <ul class="hmcts-sub-navigation__list">\n <li class="hmcts-sub-navigation__item" *ngFor="let item of items">\n <a data-selector="sub-nav-link" class="hmcts-sub-navigation__link" [routerLink]="item.href"\n [attr.aria-current]="item.active ? \'page\' : null">\n {{item.text}}\n\n <span *ngIf="item.roundel && item.roundel > 0 " class="xui-alert-link__number"> {{item.roundel}} </span>\n </a>\n </li>\n </ul>\n</nav>\n',styles:[".xui-alert-link__number{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:.875rem;line-height:1.78571;border-radius:50%;background-color:#1d70b8;color:#fff;font-weight:700;width:25px;height:25px;margin-left:5px;text-align:center;display:inline-block;text-decoration:none}"]}]}],rn.propDecorators={label:[{type:g.Input}],items:[{type:g.Input}]},rn);function rn(){}var an=(ln.prototype.ngOnInit=function(){for(var e=this.el.nativeElement,t=e.parentElement;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},ln.decorators=[{type:g.Directive,args:[{selector:"[appRemoveHost]"}]}],ln.ctorParameters=function(){return[{type:g.ElementRef}]},ln);function ln(e){this.el=e}var cn=(un.prototype.transform=function(e){e=e.toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)},un.decorators=[{type:g.Pipe,args:[{name:"capitalize"}]}],un);function un(){}var dn=[Ye,ve,ge,me,de,x,He,Je,O,Ce,ye,j,P,ae,ne,$,J,W,se,ce,f,L,I,Y,ee,R,N,Le,nt,ut,Ve,lt,Be,it,pt,ht,ze],pn=[Yt,en,sn,nn,Jt,Xt,$t,Gt,Nt,ft,Ft,Ot,xt,St,It,kt,Pt,jt,Rt,Wt,Tt,an],gn=[cn],hn=Se,mn=(fn.decorators=[{type:g.NgModule,args:[{declarations:C(dn,pn,gn),imports:[a.CommonModule,d.FormsModule,d.ReactiveFormsModule,p.RouterModule.forChild([]),t.MatAutocompleteModule,o.MatTabsModule,n.MatInputModule,i.NgxPaginationModule],providers:[{provide:_e,useFactory:hn}],exports:C(dn,pn,[i.PaginatePipe],gn)}]}],fn);function fn(){}var vn=(bn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],bn.ctorParameters=function(){return[]},bn.ngInjectableDef=g.defineInjectable({factory:function(){return new bn},token:bn,providedIn:"root"}),bn);function bn(){}var yn=(kn.prototype.canActivate=function(t){var n=this;return h.combineLatest.apply(void 0,C(t.data.needsFeaturesEnabled.map(function(e){return n.featureToggleService.getValueOnce(e,!1)}))).pipe(m.map(function(e){return e.every(function(e){return e})}),m.map(function(e){return e||n.router.parseUrl(t.data.featureDisabledRedirect)}))},kn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],kn.ctorParameters=function(){return[{type:X},{type:p.Router}]},kn.ngInjectableDef=g.defineInjectable({factory:function(){return new kn(g.inject(X),g.inject(p.Router))},token:kn,providedIn:"root"}),kn);function kn(e,t){this.featureToggleService=e,this.router=t}var Cn=(In.prototype.initialize=function(e,t){var n=this;void 0===e&&(e={anonymous:!0}),this.ready.next(!1),this.user=e,this.clientId=t,this.client=r.initialize(this.clientId,this.user,{}),this.client.on("ready",function(){n.client.identify(n.user).then(function(){return n.ready.next(!0)})})},In.prototype.isEnabled=function(e){return this.getValue(e,!1)},In.prototype.getArray=function(e){return this.getValue(e,[])},In.prototype.getValue=function(t,e){var n=this;return this.features.hasOwnProperty(t)||(this.features[t]=new h.BehaviorSubject(e),this.ready.pipe(m.filter(function(e){return e}),m.map(function(){return n.client.variation(t,e)})).subscribe(function(e){n.features[t].next(e),n.client.on("change:"+t,function(e){n.features[t].next(e)})})),this.features[t].pipe(m.distinctUntilChanged())},In.prototype.getValueOnce=function(e,t){var n=this;return this.ready.pipe(m.filter(function(e){return e}),m.map(function(){return n.client.variation(e,t)}))},In.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],In.ngInjectableDef=g.defineInjectable({factory:function(){return new In},token:In,providedIn:"root"}),In);function In(){this.ready=new h.BehaviorSubject(!1),this.features={},this.user={anonymous:!0},this.clientId=""}var wn=(xn.prototype.init=function(e){this.googleAnalyticsKey=e;try{var t=this.document.createElement("script");t["async"]=!0,t.src="https://www.googletagmanager.com/gtag/js?id="+this.googleAnalyticsKey,this.document.head.appendChild(t);var n=this.document.createElement("script");n.innerHTML="\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '"+this.googleAnalyticsKey+"', {'send_page_view': false});\n ",this.document.head.appendChild(n)}catch(o){console.error("Error appending google analytics"),console.error(o)}this.listenForRouteChanges()},xn.prototype.listenForRouteChanges=function(){var t=this;this.googleAnalyticsKey&&this.router.events.subscribe(function(e){e instanceof p.NavigationEnd&&t.window.gtag("config",t.googleAnalyticsKey,{page_path:e.urlAfterRedirects,page_title:t.title.getTitle()})})},xn.prototype.event=function(e,t){this.window.gtag("event",e,t)},xn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],xn.ctorParameters=function(){return[{type:p.Router},{type:l.Title},{type:undefined,decorators:[{type:g.Inject,args:[_e]}]},{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},xn.ngInjectableDef=g.defineInjectable({factory:function(){return new xn(g.inject(p.Router),g.inject(l.Title),g.inject(_e),g.inject(a.DOCUMENT))},token:xn,providedIn:"root"}),xn);function xn(e,t,n,o){this.router=e,this.title=t,this.window=n,this.document=o}_n.prototype.init=function(e){this.googleTagManagerKey=e;try{this.window.dataLayer=this.window.dataLayer||[],this.window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var t=this.document.createElement("script");t["async"]=!0,t.src="https://www.googletagmanager.com/gtm.js?id="+this.googleTagManagerKey,this.document.head.appendChild(t)}catch(n){console.error("Error appending google tag manager"),console.error(n)}this.listenForRouteChanges()},_n.prototype.listenForRouteChanges=function(){var t=this;this.googleTagManagerKey&&this.router.events.subscribe(function(e){e instanceof p.NavigationEnd&&t.window.dataLayer.push({event:"pageview",page:{path:e.urlAfterRedirects,title:t.title.getTitle()}})})},_n.prototype.event=function(e,t){this.window.dataLayer.push({event:e,params:t})},_n.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],_n.ctorParameters=function(){return[{type:p.Router},{type:l.Title},{type:undefined,decorators:[{type:g.Inject,args:[_e]}]},{type:undefined,decorators:[{type:g.Inject,args:[a.DOCUMENT]}]}]},_n.ngInjectableDef=g.defineInjectable({factory:function(){return new _n(g.inject(p.Router),g.inject(l.Title),g.inject(_e),g.inject(a.DOCUMENT))},token:_n,providedIn:"root"}),t=_n;function _n(e,t,n,o){this.router=e,this.title=t,this.window=n,this.document=o}Sn.prototype.init=function(e){var t=this;this.idle.setIdleName(e.idleServiceName),this.idle.setTimeout(e.timeout);var n=new c.DocumentInterruptSource("mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll");this.idle.setInterrupts([n]),this.idle.onIdleEnd.pipe(m.delay(250)).subscribe(function(){t.appStateEmitter.next({type:"modal",countdown:undefined,isVisible:!1})}),this.idle.onTimeout.subscribe(function(){t.appStateEmitter.next({type:"signout"})}),this.idle.onTimeoutWarning.pipe(m.map(function(e){return 60<e?Math.ceil(e/60)+" minutes":e+" seconds"}),m.distinctUntilChanged()).subscribe(function(e){t.appStateEmitter.next({type:"modal",countdown:e,isVisible:!0})}),this.keepalive.interval(e.keepAliveInSeconds),this.keepalive.onPing.subscribe(function(){t.appStateEmitter.next({type:"keepalive"})});e=Math.floor(e.idleMilliseconds/1e3)-e.timeout;this.idle.setIdle(e),this.idle.watch()},Sn.prototype.appStateChanges=function(){return this.appStateEmitter.asObservable()},Sn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Sn.ctorParameters=function(){return[{type:c.Idle},{type:u.Keepalive}]},Sn.ngInjectableDef=g.defineInjectable({factory:function(){return new Sn(g.inject(c.Idle),g.inject(u.Keepalive))},token:Sn,providedIn:"root"}),o=Sn;function Sn(e,t){this.idle=e,this.keepalive=t,this.appStateEmitter=new h.Subject}Ln.prototype.initialise=function(e){var t=this,n=e.idleServiceName,o=e.idleModalDisplayTime,e=e.totalIdleTime;this.idle.setIdleName(n);n=this.millisecondsToSeconds(o),o=this.millisecondsToSeconds(e);this.idle.setTimeout(n);e=new c.DocumentInterruptSource("mousedown keydown DOMMouseScroll mousewheel touchstart touchmove scroll");this.idle.setInterrupts([e]),this.idle.onTimeout.subscribe(function(){t.eventEmitter.next({eventType:"sign-out"})}),this.idle.onTimeoutWarning.pipe(m.map(function(e){return 60<e?Math.ceil(e/60)+" minutes":e+" seconds"}),m.distinctUntilChanged()).subscribe(function(e){t.eventEmitter.next({eventType:"countdown",readableCountdown:e})}),this.keepalive.onPing.subscribe(function(){t.eventEmitter.next({eventType:"keep-alive"})});n=Math.floor(o)-n;this.idle.setIdle(n),this.idle.watch()},Ln.prototype.notificationOnChange=function(){return this.eventEmitter.asObservable()},Ln.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Ln.ctorParameters=function(){return[{type:c.Idle},{type:u.Keepalive}]},Ln.ngInjectableDef=g.defineInjectable({factory:function(){return new Ln(g.inject(c.Idle),g.inject(u.Keepalive))},token:Ln,providedIn:"root"}),n=Ln;function Ln(e,t){this.idle=e,this.keepalive=t,this.millisecondsToSeconds=function(e){return e/1e3},this.eventEmitter=new h.Subject}var Tn=(Object.defineProperty(En.prototype,"roles",{set:function(e){this.pRoles.next(e)},enumerable:!0,configurable:!0}),En.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],En.ngInjectableDef=g.defineInjectable({factory:function(){return new En},token:En,providedIn:"root"}),En);function En(){this.pRoles=new h.BehaviorSubject(null),this.roles$=this.pRoles.asObservable().pipe(m.skipWhile(function(e){return null===e}))}var Fn={ALL:0,ANY:1};Fn[Fn.ALL]="ALL",Fn[Fn.ANY]="ANY";An.prototype.canActivate=function(o){var i=this;return this.roleService.roles$.pipe(m.map(function(n){var e=o.data.needsRole,t=function(e){var t=new RegExp(e);return n.some(function(e){return t.test(e)})};return(o.data.roleMatching===Fn.ALL?e.every(t):e.some(t))||i.router.parseUrl(o.data.noRoleMatchRedirect)}))},An.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],An.ctorParameters=function(){return[{type:Tn},{type:p.Router}]},An.ngInjectableDef=g.defineInjectable({factory:function(){return new An(g.inject(Tn),g.inject(p.Router))},token:An,providedIn:"root"}),hn=An;function An(e,t){this.roleService=e,this.router=t}Object.defineProperty(Nn.prototype,"isLoading",{get:function(){},enumerable:!0,configurable:!0}),i=Nn;function Nn(){}Object.defineProperty(Dn.prototype,"isLoading",{get:function(){return this.loading.asObservable().pipe(m.distinctUntilChanged())},enumerable:!0,configurable:!0}),Dn.prototype.register=function(){var e=this.generateToken();return this.registered.set(e,e),this.loading.next(!0),e},Dn.prototype.unregister=function(e){this.registered["delete"](e),this.loading.next(0<this.registered.size)},Dn.prototype.generateToken=function(){return"common-lib-loading-"+window.performance.now()},Dn.decorators=[{type:g.Injectable,args:[{providedIn:"root"}]}],Dn.ngInjectableDef=g.defineInjectable({factory:function(){return new Dn},token:Dn,providedIn:"root"}),gn=Dn;function Dn(){this.registered=new Map,this.loading=new h.BehaviorSubject(!1)}e.AccessibilityComponent=f,e.CheckboxListComponent=I,e.ContactDetailsComponent=x,e.DueDateComponent=L,e.GenericFilterComponent=N,e.HmctsSessionDialogComponent=O,e.InviteUserFormComponent=P,e.InviteUserPermissionComponent=j,e.LoadingSpinnerComponent=R,e.SelectedCaseConfirmComponent=W,e.SelectedCaseListComponent=$,e.SelectedCaseComponent=J,e.ServiceMessageComponent=Y,e.ServiceMessagesComponent=ee,e.ShareCaseConfirmComponent=ne,e.ShareCaseComponent=ae,e.TabComponent=ce,e.TcConfirmComponent=de,e.TcDisplayHtmlComponent=ge,e.TcDisplayPlainComponent=me,e.TermsAndConditionsComponent=ve,e.UserDetailsComponent=ye,e.UserListComponent=Ce,e.CookieBannerComponent=Le,e.FindLocationComponent=Ve,e.SearchLocationComponent=Be,e.PaginationComponent=ze,e.FeatureToggleDirective=He,e.LetContext=qe,e.LetDirective=Je,e.COMMON_COMPONENTS=dn,e.GOV_UI_COMPONENTS=pn,e.ExuiCommonLibModule=mn,e.GovUiService=vn,e.checkboxesBeCheckedValidator=function(e){return void 0===e&&(e=1),function(t){var n=0;return Object.keys(t.controls).forEach(function(e){!0===t.controls[e].value&&n++}),n<e?{requireOneCheckboxToBeChecked:!0}:null}},e.dateValidator=function(){return function(e){var t=new Date(parseInt(e.controls.day.value,10),parseInt(e.controls.month.value,10)-1,parseInt(e.controls.year.value,10)-1);return t instanceof Date&&!isNaN(+t)?null:{dateIsInvalid:!0}}},e.radioGroupValidator=function(){return function(e){if(e.controls)for(var t in e.controls)if(!e.controls[t].valid)return{isRadioGroupInvalid:!0};return null}},e.HmctsSubNavigationComponent=sn,e.HmctsBannerComponent=$t,e.SharedCaseErrorMessages=ie,e.BadgeColour={BADGE_RED:"hmcts-badge--red",BADGE_BLUE:"hmcts-badge--blue",BADGE_GREEN:"hmcts-badge--green"},e.DateBadgeColour=S,e.SECONDS_IN_A_DAY=86400,e.AnonymousFeatureUser=Ee,e.LoggedInFeatureUser=Fe,e.RadioFilterFieldConfig=Ae,e.BookingCheckType=Ne,e.PersonRole=De,e.RoleCategory=Oe,e.FeatureToggleGuard=yn,e.FeatureToggleService=X,e.LaunchDarklyService=Cn,e.GoogleAnalyticsService=wn,e.GoogleTagManagerService=t,e.ManageSessionServices=o,e.TimeoutNotificationsService=n,e.RoleMatching=Fn,e.RoleGuard=hn,e.RoleService=Tn,e.CookieService=we,e.HasLoadingState=i,e.LoadingService=gn,e.FilterService=E,e.windowProvider=Se,e.windowToken=_e,e.ɵx=f,e.ɵz=I,e.ɵf=x,e.ɵbf=Le,e.ɵy=L,e.ɵa=Ye,e.ɵbl=Ve,e.ɵbh=nt,e.ɵbq=it,e.ɵbo=lt,e.ɵbd=N,e.ɵk=O,e.ɵo=P,e.ɵn=j,e.ɵbc=R,e.ɵbt=ze,e.ɵbk=ut,e.ɵbm=Be,e.ɵbr=pt,e.ɵbs=ht,e.ɵv=W,e.ɵt=$,e.ɵu=J,e.ɵba=Y,e.ɵbb=ee,e.ɵs=ne,e.ɵp=ae,e.ɵw=ce,e.ɵe=de,e.ɵc=ge,e.ɵd=me,e.ɵb=ve,e.ɵm=ye,e.ɵl=Ce,e.ɵq=se,e.ɵg=He,e.ɵi=qe,e.ɵj=Je,e.ɵcd=ft,e.ɵcj=kt,e.ɵci=It,e.ɵcg=xt,e.ɵch=St,e.ɵco=Tt,e.ɵce=Ft,e.ɵcc=Nt,e.ɵcf=Ot,e.ɵck=Pt,e.ɵcl=jt,e.ɵcm=Rt,e.ɵcb=Gt,e.ɵcn=Wt,e.ɵca=$t,e.ɵby=Jt,e.ɵbu=Yt,e.ɵbz=Xt,e.ɵbv=en,e.ɵbx=nn,e.ɵbw=sn,e.ɵcp=an,e.ɵcq=cn,e.ɵr=G,e.ɵbg=we,e.ɵh=X,e.ɵbe=E,e.ɵbi=et,e.ɵbn=Me,e.ɵbj=Ue,e.ɵbp=rt,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=hmcts-rpx-xui-common-lib.umd.min.js.map