@digital-realty/app-shell 11.0.1-rc.1 → 11.0.1-rc.3

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.
@@ -613,14 +613,6 @@ video {
613
613
  pointer-events: none;
614
614
  }
615
615
 
616
- .visible {
617
- visibility: visible;
618
- }
619
-
620
- .collapse {
621
- visibility: collapse;
622
- }
623
-
624
616
  .static {
625
617
  position: static;
626
618
  }
@@ -645,10 +637,6 @@ video {
645
637
  inset: 0px;
646
638
  }
647
639
 
648
- .inset-4 {
649
- inset: 1rem;
650
- }
651
-
652
640
  .-start-0 {
653
641
  inset-inline-start: -0px;
654
642
  }
@@ -657,10 +645,6 @@ video {
657
645
  left: 0px;
658
646
  }
659
647
 
660
- .left-4 {
661
- left: 1rem;
662
- }
663
-
664
648
  .left-\\[-300px\\] {
665
649
  left: -300px;
666
650
  }
@@ -713,10 +697,6 @@ video {
713
697
  margin: 0px;
714
698
  }
715
699
 
716
- .m-2 {
717
- margin: 0.5rem;
718
- }
719
-
720
700
  .m-4 {
721
701
  margin: 1rem;
722
702
  }
@@ -726,21 +706,11 @@ video {
726
706
  margin-right: -1rem;
727
707
  }
728
708
 
729
- .mx-0 {
730
- margin-left: 0px;
731
- margin-right: 0px;
732
- }
733
-
734
709
  .mx-1 {
735
710
  margin-left: 0.25rem;
736
711
  margin-right: 0.25rem;
737
712
  }
738
713
 
739
- .mx-4 {
740
- margin-left: 1rem;
741
- margin-right: 1rem;
742
- }
743
-
744
714
  .my-0 {
745
715
  margin-top: 0px;
746
716
  margin-bottom: 0px;
@@ -789,14 +759,6 @@ video {
789
759
  margin-right: 1rem;
790
760
  }
791
761
 
792
- .mt-0 {
793
- margin-top: 0px;
794
- }
795
-
796
- .mt-2 {
797
- margin-top: 0.5rem;
798
- }
799
-
800
762
  .mt-auto {
801
763
  margin-top: auto;
802
764
  }
@@ -809,18 +771,10 @@ video {
809
771
  display: flex;
810
772
  }
811
773
 
812
- .table {
813
- display: table;
814
- }
815
-
816
774
  .grid {
817
775
  display: grid;
818
776
  }
819
777
 
820
- .contents {
821
- display: contents;
822
- }
823
-
824
778
  .hidden {
825
779
  display: none;
826
780
  }
@@ -853,10 +807,6 @@ video {
853
807
  min-height: var(--body-height);
854
808
  }
855
809
 
856
- .w-0 {
857
- width: 0px;
858
- }
859
-
860
810
  .w-6 {
861
811
  width: 1.5rem;
862
812
  }
@@ -889,10 +839,6 @@ video {
889
839
  width: 580px;
890
840
  }
891
841
 
892
- .w-auto {
893
- width: auto;
894
- }
895
-
896
842
  .w-full {
897
843
  width: 100%;
898
844
  }
@@ -913,14 +859,6 @@ video {
913
859
  flex-grow: 1;
914
860
  }
915
861
 
916
- .grow-0 {
917
- flex-grow: 0;
918
- }
919
-
920
- .border-collapse {
921
- border-collapse: collapse;
922
- }
923
-
924
862
  .transform {
925
863
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
926
864
  }
@@ -969,10 +907,6 @@ video {
969
907
  grid-template-rows: min-content;
970
908
  }
971
909
 
972
- .grid-rows-none {
973
- grid-template-rows: none;
974
- }
975
-
976
910
  .flex-row {
977
911
  flex-direction: row;
978
912
  }
@@ -1061,10 +995,6 @@ video {
1061
995
  border-radius: 0.375rem;
1062
996
  }
1063
997
 
1064
- .rounded-xl {
1065
- border-radius: 0.75rem;
1066
- }
1067
-
1068
998
  .border {
1069
999
  border-width: 1px;
1070
1000
  }
@@ -1119,15 +1049,6 @@ video {
1119
1049
  padding: 1rem;
1120
1050
  }
1121
1051
 
1122
- .p-6 {
1123
- padding: 1.5rem;
1124
- }
1125
-
1126
- .px-4 {
1127
- padding-left: 1rem;
1128
- padding-right: 1rem;
1129
- }
1130
-
1131
1052
  .px-6 {
1132
1053
  padding-left: 1.5rem;
1133
1054
  padding-right: 1.5rem;
@@ -1147,10 +1068,6 @@ video {
1147
1068
  padding-bottom: 0px;
1148
1069
  }
1149
1070
 
1150
- .pb-2 {
1151
- padding-bottom: 0.5rem;
1152
- }
1153
-
1154
1071
  .pb-4 {
1155
1072
  padding-bottom: 1rem;
1156
1073
  }
@@ -1159,14 +1076,6 @@ video {
1159
1076
  padding-left: 0.25rem;
1160
1077
  }
1161
1078
 
1162
- .pl-12 {
1163
- padding-left: 3rem;
1164
- }
1165
-
1166
- .pl-3 {
1167
- padding-left: 0.75rem;
1168
- }
1169
-
1170
1079
  .pl-3\\.5 {
1171
1080
  padding-left: 0.875rem;
1172
1081
  }
@@ -1187,10 +1096,6 @@ video {
1187
1096
  padding-top: 1rem;
1188
1097
  }
1189
1098
 
1190
- .pt-8 {
1191
- padding-top: 2rem;
1192
- }
1193
-
1194
1099
  .text-left {
1195
1100
  text-align: left;
1196
1101
  }
@@ -1545,7 +1450,7 @@ video {
1545
1450
  .xl\\:flex-row {
1546
1451
  flex-direction: row;
1547
1452
  }
1548
- } `;var N;(function(i){i.READ="read",i.UNREAD="unread"})(N||(N={}));var m;(function(i){i.PLANNED_MAINTENANCE="Planned Maintenance",i.INCIDENTS="Incidents",i.DCIM_ALERTS="DCIM Alerts",i.SERVICE_TICKETS="Service Tickets"})(m||(m={}));var w;(function(i){i.Remote_Hands="Remote Hands",i.Deliveries="Deliveries",i.Removals="Removals",i.Facility_Access="Facility Access",i.Trouble_Ticket="Trouble Ticket",i.Customer_Care="Customer Care",i.FacilityAccessVisitorAccess="FacilityAccessVisitorAccess",i.FacilityAccessPermanentBadge="FacilityAccessPermanentBadge",i.FacilityAccessOspAccess="FacilityAccessOspAccess",i.FacilityAccessPopPoeAccess="FacilityAccessPopPoeAccess"})(w||(w={}));var B;(function(i){i.LOADING="Loading",i.ERROR="Error",i.SUCCESS="Success"})(B||(B={}));const Q="yyyy-MM-dd",Qt=30,Ie="yyyy-MM-dd HH:mm:ss",Yt="http://api.digitalrealty.com/notifications".replace(/\/+$/,"");class He{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Yt}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||De}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Xt=new He;class ue{constructor(e=Xt){this.configuration=e,this.fetchApi=async(t,o)=>{let a={url:t,init:o};for(const n of this.middleware)n.pre&&(a=await n.pre({fetch:this.fetchApi,...a})||a);let r;try{r=await(this.configuration.fetchApi||fetch)(a.url,a.init)}catch(n){for(const s of this.middleware)s.onError&&(r=await s.onError({fetch:this.fetchApi,url:a.url,init:a.init,error:n,response:r?r.clone():void 0})||r);if(r===void 0)throw n instanceof Error?new ii(n,"The request failed and the interceptors did not return an alternative response"):n}for(const n of this.middleware)n.post&&(r=await n.post({fetch:this.fetchApi,url:a.url,init:a.init,response:r.clone()})||r);return r},this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map(o=>({pre:o}));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map(o=>({post:o}));return this.withMiddleware(...t)}isJsonMime(e){return e?ue.jsonRegex.test(e):!1}async request(e,t){const{url:o,init:a}=await this.createFetchParams(e,t),r=await this.fetchApi(o,a);if(r&&r.status>=200&&r.status<300)return r;throw new Ve(r,"Response returned an error code")}async createFetchParams(e,t){let o=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(e.query));const a=Object.assign({},this.configuration.headers,e.headers);Object.keys(a).forEach(d=>a[d]===void 0?delete a[d]:{});const r=typeof t=="function"?t:async()=>t,n={method:e.method,headers:a,body:e.body,credentials:this.configuration.credentials},s={...n,...await r({init:n,context:e})};let c;ti(s.body)||s.body instanceof URLSearchParams||ei(s.body)?c=s.body:this.isJsonMime(a["Content-Type"])?c=JSON.stringify(s.body):c=s.body;const h={...s,body:c};return{url:o,init:h}}clone(){const e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}}ue.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ei(i){return typeof Blob<"u"&&i instanceof Blob}function ti(i){return typeof FormData<"u"&&i instanceof FormData}class Ve extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class ii extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class se extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const oi={csv:","};function De(i,e=""){return Object.keys(i).map(t=>Re(t,i[t],e)).filter(t=>t.length>0).join("&")}function Re(i,e,t=""){const o=t+(t.length?`[${i}]`:i);if(e instanceof Array){const a=e.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${a}`}if(e instanceof Set){const a=Array.from(e);return Re(i,a,t)}return e instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?De(e,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(e))}`}class j{constructor(e,t=o=>o){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}function Pe(i){return ai(i)}function ai(i,e){return i}function xa(i){return i}function xe(i){return ri(i)}function ri(i,e){return i==null?i:{id:i.id==null?void 0:i.id,resourceType:i.resource_type==null?void 0:i.resource_type,subGroup:i.sub_group==null?void 0:i.sub_group,createdAt:i.created_at==null?void 0:new Date(i.created_at),createdBy:i.created_by==null?void 0:i.created_by,subject:i.subject==null?void 0:i.subject,locations:i.locations==null?void 0:i.locations,resourceId:i.resource_id==null?void 0:i.resource_id,status:i.status==null?void 0:Pe(i.status),accountNumber:i.account_number==null?void 0:i.account_number}}function ni(i){return si(i)}function si(i,e){return i==null?i:{self:i.self==null?void 0:i.self,first:i.first==null?void 0:i.first,prev:i.prev==null?void 0:i.prev,next:i.next==null?void 0:i.next,last:i.last==null?void 0:i.last,items:i.items.map(xe)}}function li(i){return ci(i,!1)}function ci(i,e=!1){return i==null?i:{status:i.status}}function di(i){return ui(i)}function ui(i,e){return i==null?i:{updatedCount:i.updated_count==null?void 0:i.updated_count}}function hi(i){return pi(i)}function pi(i,e){return i==null?i:{success:i.success==null?void 0:i.success}}function mi(i){return gi(i)}function gi(i,e){return i==null?i:{status:Pe(i.status)}}function fi(i){return wi(i,!1)}function wi(i,e=!1){return i==null?i:{status:i.status}}function bi(i){return vi(i,!1)}function vi(i,e=!1){return i==null?i:{resource_type:i.resourceType,sub_group:i.subGroup,recipients:i.recipients,account_number:i.accountNumber,locations:i.locations,resource_id:i.resourceId,subject:i.subject,created_at:i.createdAt==null?i.createdAt:i.createdAt.toISOString()}}class xi extends ue{async createNotificationRaw(e,t){const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"POST",headers:a,query:o,body:bi(e.notificationRequest)},t);return new j(r,n=>xe(n))}async createNotification(e={},t){return await(await this.createNotificationRaw(e,t)).value()}async deleteNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling deleteNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"DELETE",headers:a,query:o},t);return new j(n,s=>hi(s))}async deleteNotificationsById(e,t){return await(await this.deleteNotificationsByIdRaw(e,t)).value()}async getNotificationsRaw(e,t){const o={};e.sort!=null&&(o.sort=e.sort),e.cursor!=null&&(o.cursor=e.cursor),e.resourceType!=null&&(o.resource_type=e.resourceType),e.accountNumber!=null&&(o.account_number=e.accountNumber),e.createdAfter!=null&&(o.created_after=e.createdAfter.toISOString()),e.createdBefore!=null&&(o.created_before=e.createdBefore.toISOString()),e.locationId!=null&&(o.location_id=e.locationId),e.subGroup!=null&&(o.sub_group=e.subGroup),e.status!=null&&(o.status=e.status);const a={};if(e.prefer!=null&&(a.Prefer=e.prefer.join(oi.csv)),this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"GET",headers:a,query:o},t);return new j(r,n=>ni(n))}async getNotifications(e={},t){return await(await this.getNotificationsRaw(e,t)).value()}async getNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling getNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"GET",headers:a,query:o},t);return new j(n,s=>xe(s))}async getNotificationsById(e,t){return await(await this.getNotificationsByIdRaw(e,t)).value()}async patchNotificationsRaw(e,t){if(e.notificationBulkPatch==null)throw new se("notificationBulkPatch",'Required parameter "notificationBulkPatch" was null or undefined when calling patchNotifications().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"PATCH",headers:a,query:o,body:li(e.notificationBulkPatch)},t);return new j(r,n=>di(n))}async patchNotifications(e,t){return await(await this.patchNotificationsRaw(e,t)).value()}async patchNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling patchNotificationsById().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"PATCH",headers:a,query:o,body:fi(e.notificationPatch)},t);return new j(n,s=>mi(s))}async patchNotificationsById(e,t){return await(await this.patchNotificationsByIdRaw(e,t)).value()}}const yi={Notifications:"notifications"};class Ci{constructor(e){this.noInit=!1,this.configuration=e}get notificationsApi(){return new xi(new He({basePath:`${this.configuration.NotificationApiUrl}/${yi.Notifications}`,headers:{Authorization:this.getAuthorization()}}))}getAuthorization(){return this.configuration.getAuthorizationFn?this.configuration.getAuthorizationFn():""}}const ye=i=>i==null||i==="",_i=i=>{switch(i.toLowerCase()){case"planned maintenance":return m.PLANNED_MAINTENANCE;case"incidents":return m.INCIDENTS;case"dcim alerts":return m.DCIM_ALERTS;case"service tickets":return m.SERVICE_TICKETS;default:return m.PLANNED_MAINTENANCE}},ki=i=>{switch(i.toLowerCase()){case"unread":return N.UNREAD;case"read":return N.READ;default:return N.UNREAD}},Ai=i=>({sort:"-created_at",cursor:i,prefer:[""]}),Ei=(i,e)=>({id:i,notificationPatch:{status:e}}),Ni=i=>({id:i}),Oe=i=>{var e,t,o,a,r,n,s,c;return{subject:(e=i.subject)!=null?e:"",id:i.id,accountNumber:(t=i.accountNumber)!=null?t:"",resourceType:_i((o=i.resourceType)!=null?o:""),subGroup:(a=i.subGroup)!=null?a:"",resourceId:(r=i.resourceId)!=null?r:"",status:ki((n=i.status)!=null?n:""),createdAt:ye(i.createdAt)?F(new Date,Ie):F(i.createdAt,Ie),createdBy:(s=i.createdBy)!=null?s:"",locations:(c=i.locations)!=null?c:[]}},ze=i=>i.map(e=>Oe(e)),Si=i=>{const e=new URLSearchParams(i),t=e.has("cursor")?e.get("cursor"):"";return t!==null?t:""},Y=async(i,e=!0)=>{let t="An error occurred";if(i instanceof Ve&&i.response.status===400)try{const{detail:o}=await i.response.json();t=o,e&&console.error(t)}catch(o){console.error(i)}else console.error(i)},Mi=i=>{const e=localStorage.getItem(i);return e?JSON.parse(e):null},$i=i=>{var e;return`Bearer ${(e=Mi(i))==null?void 0:e.access_token}`};let Ti=class{constructor(){this.showDrawer=!1,this.apiClient={noInit:!0},this.baseApiUrl="",this.localStorageKey="",this.NewApiClient=()=>{this.apiClient=new Ci({NotificationApiUrl:this.baseApiUrl,getAuthorizationFn:()=>$i(this.localStorageKey)}),this.getNotifications()},this.nextPageCursor="",this.notifications=[],this.unreadNotificationCount=0,this.notificationFilters={SHOW_PLANNED_MAINTENANCE:!0,SHOW_SERVICE_TICKETS:!0,SHOW_DCIM_ALERTS:!0},this.selectedNotification={id:"",resourceType:m.PLANNED_MAINTENANCE,subGroup:"",subject:"",resourceId:"",locations:[],createdAt:"",accountNumber:"",createdBy:"",status:N.READ},this.dateFilters={FROM_DATE:wt(new Date,Qt),TO_DATE:new Date},dt(this),ht(this,{name:"notification-state",properties:["notificationFilters","nextPageCursor"],storage:window.localStorage})}get isHydrated(){return pt(this)}async hydrateStore(){await mt(this)}async clearStoredData(){await gt(this)}async getStoredData(){return ft(this)}ConstructApiClient(){return this.apiClient.noInit?this.NewApiClient():this.apiClient}async clearStoredNotificationsData(){this.notifications=[],this.unreadNotificationCount=0,this.nextPageCursor="",this.apiClient={noInit:!0}}async setNotificationReadStatus(e){const t=await this.setNotificationAsRead(e.toString());if(await t===!0){this.ReduceUnreadNotificationCount();const o=this.notifications.findIndex(a=>a.id===e);this.notifications[o].status=N.READ,this.selectedNotification=this.notifications[o]}return t}async setNotificationDeleted(e){const t=await this.DeleteNotification(e.toString());if(t===!0){const o=this.notifications.find(r=>r.id===e);(o==null?void 0:o.status)==="unread"&&this.ReduceUnreadNotificationCount();const a=this.notifications.findIndex(r=>r.id===e);this.notifications.splice(a,1)}return{State:t===!0?B.SUCCESS:B.ERROR,Message:t===!0?"Successfully deleted the notification":"Error while deleting the notification"}}setNotificationDateFilter(e,t){e!==void 0?this.dateFilters.FROM_DATE=Ee(e,Q,new Date):this.dateFilters.FROM_DATE=void 0,t!==void 0?this.dateFilters.TO_DATE=Ee(t,Q,new Date):this.dateFilters.TO_DATE=void 0}setNotificationFilter(e,t){switch(e){case m.PLANNED_MAINTENANCE:this.notificationFilters.SHOW_PLANNED_MAINTENANCE=t;break;case m.SERVICE_TICKETS:this.notificationFilters.SHOW_SERVICE_TICKETS=t;break;case m.DCIM_ALERTS:this.notificationFilters.SHOW_DCIM_ALERTS=t;break}}async getNotifications(){var e;let t;if(this.nextPageCursor!==void 0&&(t=await((e=this.apiClient)==null?void 0:e.notificationsApi.getNotificationsRaw(Ai(Si(this.nextPageCursor))).catch(o=>{Y(o,!1)})),t)){const o=await(t==null?void 0:t.value());this.notifications=this.nextPageCursor===""?ze(o==null?void 0:o.items):this.notifications.concat(ze(o==null?void 0:o.items)),this.nextPageCursor=(o==null?void 0:o.next)!==void 0?o==null?void 0:o.next:void 0,this.unreadNotificationCount=t.raw.headers.get("x-total-unread-count")!==null&&t.raw.headers.get("x-total-unread-count")!==void 0?t.raw.headers.get("x-total-unread-count"):0}}async getNotificationsById(e){var t;let o;e&&(o=await((t=this.apiClient)==null?void 0:t.notificationsApi.getNotificationsById({id:e}).catch(a=>{Y(a,!1)}))),o&&(this.selectedNotification=Oe(o))}async setNotificationAsRead(e){var t;return e?(await((t=this.apiClient)==null?void 0:t.notificationsApi.patchNotificationsById(Ei(e,"read")).catch(o=>(Y(o,!1),!1))),!0):!1}async setAllNotificationAsRead(){var e;const t=await((e=this.apiClient)==null?void 0:e.notificationsApi.patchNotifications({notificationBulkPatch:{status:N.READ}}).catch(o=>(Y(o,!1),!1)));return this.notifications=this.notifications.map(o=>({...o,status:N.READ})),this.unreadNotificationCount=0,t}async DeleteNotification(e){var t;let o=!1;return e&&await((t=this.apiClient)==null?void 0:t.notificationsApi.deleteNotificationsById(Ni(e)).catch(a=>{Y(a,!1),o=!1}).then(()=>{o=!0})),o}ReduceUnreadNotificationCount(){this.unreadNotificationCount>0&&(this.unreadNotificationCount-=1)}};const u=new Ti,H=L`:host{--ix-drawer-border-radius:0;--ix-drawer-padding:0;--ix-drawer-width-sm:320px;--ix-drawer-width-md:320px;--ix-drawer-width-lg:400px}.destructive-icon{color:var(--clr-critical,#db0028);--md-icon-button-icon-color:var(--clr-critical, #DB0028);--md-sys-color-on-surface-variant:var(--clr-critical, #DB0028)}.destructive-icon path{fill:var(--clr-critical,#db0028)}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.active-icon path{fill:var(--clr-primary,#1456e0)}.inactive-icon{color:var(--clr-on-surface,#092241);--md-icon-button-icon-color:var(--clr-on-surface, #092241);--md-sys-color-on-surface-variant:var(--clr-on-surface, #092241);cursor:default;opacity:.6}.inactive-icon path{fill:var(--clr-on-surface,#092241);opacity:.6}ix-icon-button.sharp{--md-icon-font:'Material Symbols Sharp'!important}.ix-icon-groups{--ix-icon-font-size:32px;--ix-icon-line-height:32px}.ix-icon-groups ix-icon{color:var(--clr-on-surface,#092241);opacity:.6}.ix-icon-groups ix-icon path{fill:var(--clr-on-surface,#092241)}.datefilter-dropdown-content,.filter-dropdown-content{position:absolute;right:5%;top:3rem;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:var(--clr-surface-container-lowest,#fff)}.unread{font-family:var(--root-primary-font, 'sans-serif');padding:0 5px;font-size:var(--text-caption-size,.75rem);line-height:var(--text-caption-line-height,1.33333333em);left:22px;top:0;background:var(--clr-critical,#db0028);letter-spacing:var(--text-caption-letter-spacing,.03333333em)}.notification-tooltip{background-color:var(--cp-neutral-blue-4,#040d19);white-space:nowrap;font-size:var(--text-caption-size,.75rem);z-index:9999;color:var(--clr-on-secondary,#fff)}.notification-modal-subtitle,.notification-modal-title{color:var(--clr-on-surface,#092241);font-family:var(--root-secondary-font, 'sans-serif')}.notification-modal-subtitle{font-size:var(--text-heading-size,1.25rem);line-height:var(--text-heading-line-height,1.2em)}.notification-modal-content{display:inline-grid;grid-template-columns:fit-content(183px) 1fr;grid-template-rows:auto auto;grid-column-gap:24px;grid-row-gap:8px;font-family:var(--root-primary-font, 'sans-serif');font-size:var(--text-default-size,16px);line-height:28px;width:560px;padding-bottom:16px;color:var(--clr-on-surface,#092241)}.notification-modal-content-title{width:183px;color:var(--clr-on-surface-variant,#092241B3)}.notification-modal-subject-title{grid-area:1/1/2/2}.notification-modal-subject-text{grid-area:1/2/2/3}.notification-modal-created-date-title{grid-area:2/1/3/2}.notification-modal-created-date-text{grid-area:2/2/3/3}.notification-modal-site-title{grid-area:3/1/4/2}.notification-modal-site-text{grid-area:3/2/4/3}`;let le=class extends M{constructor(){super(...arguments),this.textMessage="Are you sure?",this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("confirm-dialog-closed")),this.onClick(!1)}}static get styles(){return[k,H]}onClick(e){const t=new CustomEvent("on-confirm-selection",{detail:{returnValue:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}render(){return l` <ix-dialog ?open="${this.open}" class="w-[580px]" @closed="${this.dialogClosed}"> <div slot="headline">${this.textMessage}</div> <div slot="actions"> <div class="flex flex-row justify-end p-1"> <ix-button name="cancel" appearance="text" @click="${()=>this.onClick(!1)}">DISMISS</ix-button> <ix-button name="confirm" appearance="text" @click="${()=>this.onClick(!0)}">YES</ix-button> </div> </div> </ix-dialog>`}};p([C({type:String,attribute:!0})],le.prototype,"textMessage",void 0),p([C({type:Boolean,attribute:!0})],le.prototype,"open",void 0),le=p([R("confirmation-dialog")],le);let ce=class extends M{constructor(){super(...arguments),this.notification={},this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("view-item-dialog-closed"))},this.viewRecord=()=>{this.dialogClosed(),u.showDrawer=!1}}static get styles(){return[k,H]}getUrl(){const e=this.notification.resourceId;switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return`/service-management/reports?ticketId=${e}`;case m.SERVICE_TICKETS:switch(this.notification.subGroup){case w.Remote_Hands:return`/service-management/service-tickets/remote-hands/${e}`;case w.Customer_Care:return`/service-management/service-tickets/customer-care/${e}`;case w.Deliveries:return`/service-management/service-tickets/${w.Deliveries}/${e}`;case w.Facility_Access:return`/service-management/service-tickets/facility-access/${e}`;case w.Removals:return`/service-management/service-tickets/removals/${e}`;case w.Trouble_Ticket:return`/service-management/service-tickets/trouble-tickets/${e}`;case w.FacilityAccessVisitorAccess:return`/service-management/service-tickets/facility-access/visitor-access/${e}`;case w.FacilityAccessPermanentBadge:return`/service-management/service-tickets/facility-access/permanent-badge/${e}`;case w.FacilityAccessOspAccess:return`/service-management/service-tickets/facility-access/osp-access/${e}`;case w.FacilityAccessPopPoeAccess:return`/service-management/service-tickets/facility-access/pop-poe-access/${e}`;default:return""}case m.INCIDENTS:return`/service-management/reports?ticketId=${e}`;case m.DCIM_ALERTS:return`/dcim/${e}`;default:return""}}getLocation(){return this.notification.locations===void 0||this.notification.locations.length<1?"":this.notification.locations.length>1?"Multiple Sites":this.notification.locations[0]}getSubGroupDisplayName(){switch(this.notification.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";case"Incidents (GSN)":return"Incidents";case"Emergency Repairs (InSite 1.0)":return"Emergency Repairs";default:return this.notification.subGroup}}render(){return l` <ix-dialog ?open="${this.open}" @closed="${this.dialogClosed}" class="notification-modal" data-testclass="notification-modal"> <div slot="headline" class="w-[560px]"> <div class="flex flex-col flex-start"> <div class="notification-modal-title text-2xl font-bold text-balance"> ${this.notification.resourceType} </div> <div class="notification-modal-subtitle pt-4 pb-0 font-bold text-balance" data-testid="notification-view-item-ticket-type"> ${this.getSubGroupDisplayName()} </div> </div> </div> <form class="notification-modal-content" slot="content" id="form-id" method="dialog"> <div class="notification-modal-content-title notification-modal-subject-title"> Subject </div> <div class="notification-modal-subject-text font-normal text-wrap" data-testid="notification-view-item-subject"> ${this.notification.subject} </div> <div class="notification-modal-content-title notification-modal-created-date-title"> Create Date </div> <div class="notification-modal-created-date-text font-normal text-wrap" data-testid="notification-view-item-date"> ${F(new Date(this.notification.createdAt),"dd/MM/yyyy HH:mm:ss")} </div> <div class="notification-modal-content-title notification-modal-site-title"> Site </div> <div class="notification-modal-site-text font-normal text-wrap" data-testid="notification-view-item-site-text"> ${this.getLocation()} </div> </form> <div slot="actions" class="flex flex-row flex-end"> <ix-button data-testid="notification-view-item-close" form="form-id" appearance="text"> Close </ix-button> <ix-button data-testid="notification-view-item-view-record" href="${this.getUrl()}" @click="${this.viewRecord}" appearance="text">View Record</ix-button> </div> </ix-dialog>`}};p([C({type:Object,attribute:!1})],ce.prototype,"notification",void 0),p([C({type:Boolean,attribute:!0})],ce.prototype,"open",void 0),ce=p([R("view-item-dialog")],ce);let P=class extends M{constructor(){super(...arguments),this.disabled=!1,this.read=!1,this.notification={},this.showModal=!1,this.showDeleteConfirmation=!1}static get styles(){return[k,H]}displayItem(){this.notification.status===N.UNREAD&&(u.setNotificationReadStatus(this.notification.id),this.read=!0),this.showModal=!0}deleteItem(){this.disabled||(this.showDeleteConfirmation=!0)}confirmedDelete(e){e.detail.returnValue&&u.setNotificationDeleted(this.notification.id).then(t=>{this.showDeleteResultMessage(t,this.notification.id)}),this.showDeleteConfirmation=!1}showDeleteResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-delete-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:2e3,durationOut:2e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}calculateDuration(){return this.notification.createdAt!==void 0?he(new Date,new Date(this.notification.createdAt))<24?bt(new Date(this.notification.createdAt),new Date,{addSuffix:!0}):l`<ix-date type="static" variant="date-time" .value="${this.notification.createdAt}"></ix-date>`:"N/A"}getNotificationIcon(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return Le;case m.SERVICE_TICKETS:return"sync_saved_locally";case m.INCIDENTS:return"report";case m.DCIM_ALERTS:return Te;default:return"sync_saved_locally"}}getNotificationTitle(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return"Planned Maintenance";case m.SERVICE_TICKETS:return`${this.getServiceTicketSubGroup()} Service Ticket Update`;case m.INCIDENTS:return"Emergency Repair";case m.DCIM_ALERTS:return"DCIM Alert";default:return"sync_saved_locally"}}getServiceTicketSubGroup(){var e,t;switch((e=this.notification)==null?void 0:e.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";default:return(t=this.notification)==null?void 0:t.subGroup}}render(){return l` <div data-testid="notification-item" class="relative notification-item"> <div class="hover:bg-[rgba(0,0,0,0.04)] p-2 pl-3.5 flex gap-3 relative cursor-pointer items-center font-bold ${this.read?"notification-item-read border-l-3 border-transparent":"notification-item-unread border-l-3 border-success"}"> <ix-icon style="--ix-icon-font-size:24px;--ix-icon-line-height:24px" icon="${this.getNotificationIcon()}" class="${this.read?"inactive-icon":"active-icon"}" @click="${this.displayItem}">${this.getNotificationIcon()} </ix-icon> <div class="flex flex-col grow" @click="${this.displayItem}"> <div class="grow text-base"> <h2 class="dlr-text-caption">${this.getNotificationTitle()}</h2> </div> <div class="grow text-xs"> <h3 class="dlr-text-caption text-on-surface-disabled"> ${this.calculateDuration()} </h3> </div> </div> <div> <view-item-dialog ?open="${this.showModal}" .notification="${this.notification}" @view-item-dialog-closed="${()=>{this.showModal=!1}}"> </view-item-dialog> <confirmation-dialog ?open="${this.showDeleteConfirmation}" @on-confirm-selection="${this.confirmedDelete}" @confirm-dialog-closed="${()=>{this.showModal=!1}}" textMessage="Are you sure you want to delete this notification?" data-testclass="notification-delete-confirmation"> </confirmation-dialog> </div> <ix-icon-button style="--md-icon-button-icon-size:24px" data-testclass="delete-notification" @click="${this.deleteItem}" @mouseover="${e=>{this.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:this.disabled?"Emergency Repair Notification cannot be removed":"Remove Notification",target:e.target}}))}}" @mouseout="${()=>this.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" ?disabled="${this.disabled}"> <ix-icon slot="default" class="${this.disabled?"inactive-icon":"destructive-icon"}"> ${Kt} </ix-icon> </ix-icon-button> </div> </div> `}};p([C({type:Boolean})],P.prototype,"disabled",void 0),p([C({type:Boolean})],P.prototype,"read",void 0),p([C({type:Object,attribute:!1})],P.prototype,"notification",void 0),p([E()],P.prototype,"showModal",void 0),p([E()],P.prototype,"showDeleteConfirmation",void 0),P=p([R("notification-item")],P);let U=class extends M{constructor(){super(...arguments),this.groupTitle="Group 1",this.groupIcon="public",this.childItems=u.notifications,this.isOpen=!1,this.onClick=()=>{this.isOpen=!this.isOpen}}static get styles(){return[k,H]}renderNotificationItems(){var e,t,o;return this.isOpen?((e=this.childItems)==null?void 0:e.length)!==void 0&&((t=this.childItems)==null?void 0:t.length)>0?l`<div> ${(o=this.childItems)==null?void 0:o.map(a=>l`<notification-item .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}" data-testclass="notification-item"> </notification-item>`)} </div>`:l`<p class="dlr-text-caption ml-14 font-bold mr-4" data-testid="msg-no-notifications"> No notifications yet. </p>`:l`${v}`}render(){var e;return l`<div class="group-container-row border-b border-outline py-3"> <div class="flex items-center justify-between"> <div class="flex items-center align-middle"> <ix-icon-button icon="${this.isOpen?"arrow_drop_down":"arrow_right"}" @click="${this.onClick}" data-testclass="grouped-item-toggle-expand"> </ix-icon-button> <ix-icon slot="default" class="ix-icon-groups">${vt(this.groupIcon)}</ix-icon> <p class="m-0 group-name font-bold pl-1">${this.groupTitle}</p> <p class="m-0 pl-4"> ${(e=this.childItems)==null?void 0:e.length.toString().padStart(2,"0")} </p> </div> </div> ${this.renderNotificationItems()} </div>`}};p([C({type:String,attribute:!0})],U.prototype,"groupTitle",void 0),p([C({type:String,attribute:!0})],U.prototype,"groupIcon",void 0),p([C({type:Array,attribute:!0})],U.prototype,"childItems",void 0),p([E()],U.prototype,"isOpen",void 0),U=p([R("grouped-item")],U);let Fe=class extends M{static get styles(){return[k,H]}onSwitchChange(e){var t;const o=e.target,a=(t=o.attributes.getNamedItem("name"))==null?void 0:t.value;u.setNotificationFilter(a,o.selected),this.requestUpdate()}render(){return l` <div class="flex flex-col"> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="planned-maintenance-switch" class="flex" name="${m.PLANNED_MAINTENANCE}" selected="${u.notificationFilters.SHOW_PLANNED_MAINTENANCE}" @change="${this.onSwitchChange}"></ix-switch> <span>Planned Maintenance</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="service-tickets-switch" class="flex" name="${m.SERVICE_TICKETS}" selected="${u.notificationFilters.SHOW_SERVICE_TICKETS}" @change="${this.onSwitchChange}"></ix-switch> <span>Service Ticket Updates</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="dcim-alerts-switch" class="flex" name="${m.DCIM_ALERTS}" selected="${u.notificationFilters.SHOW_DCIM_ALERTS}" @change="${this.onSwitchChange}"></ix-switch> <span>${m.DCIM_ALERTS}</span></label> </div>`}};Fe=p([R("group-filters")],Fe);let O=class extends M{constructor(){super(...arguments),this.fromDate=ye(u.dateFilters.FROM_DATE)?void 0:F(u.dateFilters.FROM_DATE,Q),this.toDate=ye(u.dateFilters.TO_DATE)?void 0:F(u.dateFilters.TO_DATE,Q),this.maxDate=F(new Date,Q),this.fromDateErrorText="",this.toDateErrorText=""}static get styles(){return[k,H]}onFromDateChange(e){e===null||e===""?this.fromDate=void 0:(this.fromDate=e,this.fromDate!==void 0&&(this.fromDateErrorText=void 0))}onToDateChange(e){e===null||e===""?this.toDate=void 0:(this.toDate=e,this.toDate!==void 0&&(this.toDateErrorText=void 0))}onApplyDateFilter(e){if(e){if(this.toDate===void 0&&this.fromDate!==void 0){this.toDateErrorText="Please select to date";return}if(this.fromDate===void 0&&this.toDate!==void 0){this.fromDateErrorText="Please select from date";return}if(this.fromDate>this.toDate){this.fromDateErrorText="From date cannot be later than To date.",this.fromDate=void 0;return}if(this.fromDateErrorText=void 0,this.toDate<this.fromDate){this.toDateErrorText="To date cannot be earlier than From date.",this.toDate=void 0;return}this.toDateErrorText=void 0}const t=e&&this.toDateErrorText===void 0&&this.fromDateErrorText===void 0;t&&(u.setNotificationDateFilter(this.fromDate,this.toDate),this.requestUpdate());const o=new CustomEvent("on-selection",{detail:{returnValue:t},bubbles:!0,composed:!0});this.dispatchEvent(o)}clearDateFilters(){this.fromDate=void 0,this.toDate=void 0,this.fromDateErrorText=void 0,this.toDateErrorText=void 0}render(){return l` <div class="flex flex-col p-4"> <div class="flex flex-row items-center"> <div class="grow items-center text-xl font-bold">Filter by Date</div> <div class="flex flex-row items-center" @click="${this.clearDateFilters}"> <label class="grow text-sm text-right pr-1 cursor-pointer">Clear Filter</label> <ix-icon-button data-testid="notifications-clear-date-filter" small appearance="default" icon="domain_verification_off" class="active-icon"></ix-icon-button> </div> </div> <ix-divider class="my-2"></ix-divider> <div class="flex xl:flex-row lg:flex-col md:flex-col sm:flex-col justify-between item-center my-4"> <div class="flex gap-2"> <ix-date data-testid="notifications-from-date" .value="${this.fromDate}" max="${this.maxDate}" label="From" name="FromDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onFromDateChange(e)}"> </ix-date> <ix-date data-testid="notifications-to-date" .value="${this.toDate}" max="${this.maxDate}" label="To" name="ToDate" .errorText="${this.toDateErrorText}" .onChanged="${e=>this.onToDateChange(e)}"></ix-date> </div> </div> <div class="flex flex-row justify-between"> <ix-button data-testid="notifications-cancel-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!1)}">Cancel</ix-button> <ix-button data-testid="notifications-activate-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!0)}">Filter List</ix-button> </div> </div>`}};p([E()],O.prototype,"fromDate",void 0),p([E()],O.prototype,"toDate",void 0),p([E()],O.prototype,"maxDate",void 0),p([E()],O.prototype,"fromDateErrorText",void 0),p([E()],O.prototype,"toDateErrorText",void 0),O=p([R("date-filters")],O);let q=class extends M{constructor(){super(...arguments),this.isVisible=!1,this.label="",this.hoveredElement=void 0,this.configureNotificationTooltip=e=>{const{label:t,target:o}=e.detail;this.hoveredElement=o,this.label=t,this.isVisible=!0},this.hideNotificationTooltip=()=>{this.isVisible=!1,this.hoveredElement=void 0,this.label=""}}static get styles(){return[k,H]}connectedCallback(){super.connectedCallback(),window.addEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.addEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.removeEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}updated(e){e.has("hoveredElement")&&this.isVisible&&this.hoveredElement&&Ne(this.hoveredElement,this.notificationTooltip,{placement:"bottom-end"}).then(({x:t,y:o})=>{this.notificationTooltip.style.left=`${t}px`,this.notificationTooltip.style.top=`${o+12}px`})}render(){const e={hidden:!this.isVisible};return l`<div class="notification-tooltip z-[9999] rounded absolute p-2 white-text ${xt(e)}"> ${this.label} </div> <slot></slot>`}};p([W(".notification-tooltip")],q.prototype,"notificationTooltip",void 0),p([C({type:Boolean,reflect:!0})],q.prototype,"isVisible",void 0),p([C({type:String,reflect:!0})],q.prototype,"label",void 0),p([E()],q.prototype,"hoveredElement",void 0),q=p([R("notification-tooltip")],q);class S extends M{constructor(){super(...arguments),this.showGroupedView=!1,this.showFilters=!1,this.showDateFilters=!1,this.showMarkAllReadConfirmation=!1,this.baseApiUrl="",this.localStorageKey=""}async firstUpdated(){u.baseApiUrl=this.baseApiUrl,u.localStorageKey=this.localStorageKey,u.ConstructApiClient()}connectedCallback(){super.connectedCallback(),window.addEventListener("account-switched",u.NewApiClient),window.addEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.addEventListener("beforeunload",this.handleOnbeforeunload)}disconnectedCallback(){super.disconnectedCallback(),this.handleOnbeforeunload(),window.removeEventListener("account-switched",u.NewApiClient),window.removeEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.removeEventListener("beforeunload",this.handleOnbeforeunload)}handleOnbeforeunload(){u.clearStoredNotificationsData()}toggleDrawer(){u.showDrawer=!u.showDrawer,u.showDrawer||(this.showFilters=!1,this.showDateFilters=!1)}markAllread(){u.unreadNotificationCount>0&&(this.showMarkAllReadConfirmation=!0)}async confirmedMarkAllRead(e){if(e.detail.returnValue){try{const t=await u.setAllNotificationAsRead();this.showResultMessage({State:B.SUCCESS,Message:`Successfully marked ${t.updatedCount} notifications as read`},"all-read")}catch(t){this.showResultMessage({State:B.ERROR,Message:"Error while marking the notifications read, Please try again"},"all-read")}this.requestUpdate()}this.showMarkAllReadConfirmation=!1}showResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-read-all-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:3e3,durationOut:3e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}toggleGroupView(){this.showGroupedView=!this.showGroupedView}displayFilters(){this.showFilters=!this.showFilters}applyNotificationFilters(){var e;const t=(e=u.notifications)==null?void 0:e.filter(o=>o.resourceType===m.PLANNED_MAINTENANCE&&u.notificationFilters.SHOW_PLANNED_MAINTENANCE===!0||o.resourceType===m.SERVICE_TICKETS&&u.notificationFilters.SHOW_SERVICE_TICKETS===!0||o.resourceType===m.DCIM_ALERTS&&u.notificationFilters.SHOW_DCIM_ALERTS===!0||o.resourceType===m.INCIDENTS);return u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0&&ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE===void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0):u.dateFilters.FROM_DATE===void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):t}displayDateFilters(){this.showDateFilters=!this.showDateFilters}renderGroupedView(){const e=this.applyNotificationFilters();return l`<div class="-mx-4 -mt-2"> <grouped-item data-testid="planned-maintenance-group" groupTitle="Planned Maintenance" groupIcon="${Le.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.PLANNED_MAINTENANCE)}"></grouped-item> <grouped-item data-testid="emergency-repairs-group" groupTitle="Emergency Repairs" groupIcon="report" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.INCIDENTS)}"></grouped-item> <grouped-item data-testid="service-ticket-updates-group" groupTitle="Service Ticket Updates" groupIcon="sync_saved_locally" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.SERVICE_TICKETS)}"></grouped-item> <grouped-item data-testid="dcim-alerts-group" groupTitle="${m.DCIM_ALERTS}" groupIcon="${Te.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.DCIM_ALERTS)}"></grouped-item> </div>`}renderDefaultView(){const e=this.applyNotificationFilters(),t=e.filter(a=>ie(new Date(a.createdAt),new Date)===0),o=e.filter(a=>ie(new Date(a.createdAt),new Date)!==0);return(e==null?void 0:e.length)>0?l` <h3>Today</h3> ${t.length>0?l`<div class="-mx-4"> ${t==null?void 0:t.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="today-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} <h3>Earlier</h3> ${o.length>0?l`<div class="-mx-4" data-testid="earlier-notifications"> ${o==null?void 0:o.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="earlier-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} `:l`<h3>Today</h3> ${this.renderNoResult()}`}renderNoResult(){return l`<p class="dlr-text-caption my-4"> <strong>No notifications yet.</strong> </p>`}handleCloseClick(e){this.showDateFilters=!1,this.showFilters=!1}handleContentScroll(e){e!==null&&e.detail.scrollTop+e.detail.clientHeight>=e.detail.scrollHeight-2&&u.getNotifications()}manageFilterVisibility(e){const t=e.composedPath();this.showFilters&&!t.includes(this.groupFilters)&&!t.includes(this.groupFiltersButton)&&(this.showFilters=!1),this.showDateFilters&&!t.includes(this.dateFilters)&&!t.includes(this.dateFiltersButton)&&(this.showDateFilters=!1)}render(){return l` <notification-tooltip data-testid="notifications-tooltip"> </notification-tooltip> <confirmation-dialog data-testid="notifications-confirm-read-dialog" ?open="${this.showMarkAllReadConfirmation}" @confirm-dialog-closed="${()=>{this.showMarkAllReadConfirmation=!1}}" @on-confirm-selection="${this.confirmedMarkAllRead}" textMessage="Are you sure you want to mark all notifications as read?"> </confirmation-dialog> <ix-drawer data-testid="notifications-drawer" ?isVisible="${u.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" animate-vertical hide-close @on-content-scroll="${this.handleContentScroll}" @click="${this.manageFilterVisibility}" compact="compact"> <div slot="content" class="m-4"> <div class="flex flex-row justify-between grow items-center notification-header-container mb-4"> <h2 data-testid="notifications-heading" class="grow items-center dlr-text-heading"> Notifications </h2> <div class="flex flex-row justify-end grow items-center options" style="--md-icon-button-icon-size:24px"> <ix-icon-button data-testid="notifications-cta-all-read" data-testclass="notifications-cta" @click="${this.markAllread}" @mouseover="${e=>{u.unreadNotificationCount>0&&window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Mark All Read",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="markunread_mailbox" class="${u.unreadNotificationCount<=0?"inactive-icon":"active-icon"}" .disabled="${u.unreadNotificationCount<=0}" filledIcon="true"></ix-icon-button> <ix-icon-button data-testid="notifications-cta-sort-type" data-testclass="notifications-cta" @click="${this.toggleGroupView}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Sort by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" label="Sort by Type"> <ix-icon slot="default">${this.showGroupedView?Jt:"sort"}</ix-icon> </ix-icon-button> <ix-icon-button data-testid="notifications-cta-filter-type" data-testclass="notifications-cta" @click="${this.displayFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" id="group-filter-button" label="Filter by Type"> <ix-icon slot="default"> ${Wt} </ix-icon> </ix-icon-button> <div data-testid="notifications-filter-dropdown" class="filter-dropdown-content ${this.showFilters?"active z-50":"hidden"}"> <group-filters></group-filters> </div> <ix-icon-button data-testid="notifications-cta-filter-date" data-testclass="notifications-cta" @click="${this.displayDateFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Date",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="date_range" class="active-icon" filledIcon="true" id="date-filters-button" label="Filter by Date"></ix-icon-button> <div data-testid="notifications-date-filter-dropdown" class="datefilter-dropdown-content ${this.showDateFilters?"active z-50":"hidden"}" @on-selection="${this.handleCloseClick}"> <date-filters></date-filters> </div> </div> </div> ${this.showGroupedView?this.renderGroupedView():this.renderDefaultView()} </div> </ix-drawer> `}}S.styles=[k,H],p([W("group-filters")],S.prototype,"groupFilters",void 0),p([W("ix-icon-button#group-filter-button")],S.prototype,"groupFiltersButton",void 0),p([W("date-filters")],S.prototype,"dateFilters",void 0),p([W("ix-icon-button#date-filters-button")],S.prototype,"dateFiltersButton",void 0),p([E()],S.prototype,"showGroupedView",void 0),p([E()],S.prototype,"showFilters",void 0),p([E()],S.prototype,"showDateFilters",void 0),p([E()],S.prototype,"showMarkAllReadConfirmation",void 0),p([C({type:String})],S.prototype,"baseApiUrl",void 0),p([C({type:String})],S.prototype,"localStorageKey",void 0),window.customElements.define("ix-notifications",S);const Li=Object.keys(window.registeredApps).map(i=>{const e=window.registeredApps[i],{host:t,blob:o,copyNS:a}=e,r=e.entry?`${t}${e.entry}`:null;return{name:i,path:window.registeredApps[i].path,host:t,blob:o,entry:r,serviceWorker:`${t||""}${e.serviceWorker}`,enabled:window.registeredApps[i].enabled,copyNS:a}}),Ze=()=>{const i=[],e={Error:"Failed to get version info"};return i.push((async()=>{try{const t=await import("/versions.js");return{[pe]:t.default}}catch(t){return{[pe]:e}}})()),window.registeredApps["ui-user-management"].enabled&&i.push((async()=>{try{return{"ui-user-management":(await import("http://localhost:8082/versions.js")).default}}catch(t){return{"ui-user-management":e}}})()),window.registeredApps["ui-service-management"].enabled&&i.push((async()=>{try{return{"ui-service-management":(await import("http://localhost:8083/versions.js")).default}}catch(t){return{"ui-service-management":e}}})()),window.registeredApps["ui-inventory"].enabled&&i.push((async()=>{try{return{"ui-inventory":(await import("http://localhost:8089/versions.js")).default}}catch(t){return{"ui-inventory":e}}})()),window.registeredApps["ui-sites"].enabled&&i.push((async()=>{try{return{"ui-sites":(await import("http://localhost:8089/versions.js")).default}}catch(t){return{"ui-sites":e}}})()),window.registeredApps["ui-launchpad"].enabled&&i.push((async()=>{try{return{"ui-launchpad":(await import("http://localhost:8087/versions.js")).default}}catch(t){return{"ui-launchpad":e}}})()),window.registeredApps["ui-dcim-charts"].enabled&&i.push((async()=>{try{return{"ui-dcim-charts":(await import("http://localhost:8084/versions.js")).default}}catch(t){return{"ui-dcim-charts":e}}})()),window.registeredApps["ui-my-account"].enabled&&i.push((async()=>{try{return{"ui-my-account":(await import("http://localhost:8088/versions.js")).default}}catch(t){return{"ui-my-account":e}}})()),window.registeredApps["ui-dcim-reports"].enabled&&i.push((async()=>{try{return{"ui-dcim-reports":(await import("http://localhost:8085/versions.js")).default}}catch(t){return{"ui-dcim-reports":e}}})()),window.registeredApps["ui-gom"].enabled&&i.push((async()=>{try{return{"ui-gom":(await import("http://localhost:8090/versions.js")).default}}catch(t){return{"ui-gom":e}}})()),Promise.all(i)},Ii=async()=>{const i=await Ze();return console.log(JSON.stringify(i,void 0,2)),i},Hi=i=>Li.find(e=>{const t=Array.isArray(e.path)?e.path:[e.path];return e.enabled&&t.some(o=>i.startsWith(o))}),Vi=async()=>{const i=await _t();if(!i)return;window.dataLayer=[{environmentType:kt,hashedUserId:i}];const e=document.createElement("script");e.type="text/javascript",e.text=`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
1453
+ } `;var N;(function(i){i.READ="read",i.UNREAD="unread"})(N||(N={}));var m;(function(i){i.PLANNED_MAINTENANCE="Planned Maintenance",i.INCIDENTS="Incidents",i.DCIM_ALERTS="DCIM Alerts",i.SERVICE_TICKETS="Service Tickets"})(m||(m={}));var w;(function(i){i.Remote_Hands="Remote Hands",i.Deliveries="Deliveries",i.Removals="Removals",i.Facility_Access="Facility Access",i.Trouble_Ticket="Trouble Ticket",i.Customer_Care="Customer Care",i.FacilityAccessVisitorAccess="FacilityAccessVisitorAccess",i.FacilityAccessPermanentBadge="FacilityAccessPermanentBadge",i.FacilityAccessOspAccess="FacilityAccessOspAccess",i.FacilityAccessPopPoeAccess="FacilityAccessPopPoeAccess"})(w||(w={}));var B;(function(i){i.LOADING="Loading",i.ERROR="Error",i.SUCCESS="Success"})(B||(B={}));const Q="yyyy-MM-dd",Qt=30,Ie="yyyy-MM-dd HH:mm:ss",Yt="http://api.digitalrealty.com/notifications".replace(/\/+$/,"");class He{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Yt}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||De}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const Xt=new He;class ue{constructor(e=Xt){this.configuration=e,this.fetchApi=async(t,o)=>{let a={url:t,init:o};for(const n of this.middleware)n.pre&&(a=await n.pre({fetch:this.fetchApi,...a})||a);let r;try{r=await(this.configuration.fetchApi||fetch)(a.url,a.init)}catch(n){for(const s of this.middleware)s.onError&&(r=await s.onError({fetch:this.fetchApi,url:a.url,init:a.init,error:n,response:r?r.clone():void 0})||r);if(r===void 0)throw n instanceof Error?new ii(n,"The request failed and the interceptors did not return an alternative response"):n}for(const n of this.middleware)n.post&&(r=await n.post({fetch:this.fetchApi,url:a.url,init:a.init,response:r.clone()})||r);return r},this.middleware=e.middleware}withMiddleware(...e){const t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){const t=e.map(o=>({pre:o}));return this.withMiddleware(...t)}withPostMiddleware(...e){const t=e.map(o=>({post:o}));return this.withMiddleware(...t)}isJsonMime(e){return e?ue.jsonRegex.test(e):!1}async request(e,t){const{url:o,init:a}=await this.createFetchParams(e,t),r=await this.fetchApi(o,a);if(r&&r.status>=200&&r.status<300)return r;throw new Ve(r,"Response returned an error code")}async createFetchParams(e,t){let o=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(e.query));const a=Object.assign({},this.configuration.headers,e.headers);Object.keys(a).forEach(d=>a[d]===void 0?delete a[d]:{});const r=typeof t=="function"?t:async()=>t,n={method:e.method,headers:a,body:e.body,credentials:this.configuration.credentials},s={...n,...await r({init:n,context:e})};let c;ti(s.body)||s.body instanceof URLSearchParams||ei(s.body)?c=s.body:this.isJsonMime(a["Content-Type"])?c=JSON.stringify(s.body):c=s.body;const h={...s,body:c};return{url:o,init:h}}clone(){const e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}}ue.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function ei(i){return typeof Blob<"u"&&i instanceof Blob}function ti(i){return typeof FormData<"u"&&i instanceof FormData}class Ve extends Error{constructor(e,t){super(t),this.response=e,this.name="ResponseError"}}class ii extends Error{constructor(e,t){super(t),this.cause=e,this.name="FetchError"}}class se extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const oi={csv:","};function De(i,e=""){return Object.keys(i).map(t=>Re(t,i[t],e)).filter(t=>t.length>0).join("&")}function Re(i,e,t=""){const o=t+(t.length?`[${i}]`:i);if(e instanceof Array){const a=e.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${a}`}if(e instanceof Set){const a=Array.from(e);return Re(i,a,t)}return e instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?De(e,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(e))}`}class j{constructor(e,t=o=>o){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}}function Pe(i){return ai(i)}function ai(i,e){return i}function xa(i){return i}function xe(i){return ri(i)}function ri(i,e){return i==null?i:{id:i.id==null?void 0:i.id,resourceType:i.resource_type==null?void 0:i.resource_type,subGroup:i.sub_group==null?void 0:i.sub_group,createdAt:i.created_at==null?void 0:new Date(i.created_at),createdBy:i.created_by==null?void 0:i.created_by,subject:i.subject==null?void 0:i.subject,locations:i.locations==null?void 0:i.locations,resourceId:i.resource_id==null?void 0:i.resource_id,status:i.status==null?void 0:Pe(i.status),accountNumber:i.account_number==null?void 0:i.account_number}}function ni(i){return si(i)}function si(i,e){return i==null?i:{self:i.self==null?void 0:i.self,first:i.first==null?void 0:i.first,prev:i.prev==null?void 0:i.prev,next:i.next==null?void 0:i.next,last:i.last==null?void 0:i.last,items:i.items.map(xe)}}function li(i){return ci(i,!1)}function ci(i,e=!1){return i==null?i:{status:i.status}}function di(i){return ui(i)}function ui(i,e){return i==null?i:{updatedCount:i.updated_count==null?void 0:i.updated_count}}function hi(i){return pi(i)}function pi(i,e){return i==null?i:{success:i.success==null?void 0:i.success}}function mi(i){return gi(i)}function gi(i,e){return i==null?i:{status:Pe(i.status)}}function fi(i){return wi(i,!1)}function wi(i,e=!1){return i==null?i:{status:i.status}}function bi(i){return vi(i,!1)}function vi(i,e=!1){return i==null?i:{resource_type:i.resourceType,sub_group:i.subGroup,recipients:i.recipients,account_number:i.accountNumber,locations:i.locations,resource_id:i.resourceId,subject:i.subject,created_at:i.createdAt==null?i.createdAt:i.createdAt.toISOString()}}class xi extends ue{async createNotificationRaw(e,t){const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"POST",headers:a,query:o,body:bi(e.notificationRequest)},t);return new j(r,n=>xe(n))}async createNotification(e={},t){return await(await this.createNotificationRaw(e,t)).value()}async deleteNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling deleteNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"DELETE",headers:a,query:o},t);return new j(n,s=>hi(s))}async deleteNotificationsById(e,t){return await(await this.deleteNotificationsByIdRaw(e,t)).value()}async getNotificationsRaw(e,t){const o={};e.sort!=null&&(o.sort=e.sort),e.cursor!=null&&(o.cursor=e.cursor),e.resourceType!=null&&(o.resource_type=e.resourceType),e.accountNumber!=null&&(o.account_number=e.accountNumber),e.createdAfter!=null&&(o.created_after=e.createdAfter.toISOString()),e.createdBefore!=null&&(o.created_before=e.createdBefore.toISOString()),e.locationId!=null&&(o.location_id=e.locationId),e.subGroup!=null&&(o.sub_group=e.subGroup),e.status!=null&&(o.status=e.status);const a={};if(e.prefer!=null&&(a.Prefer=e.prefer.join(oi.csv)),this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"GET",headers:a,query:o},t);return new j(r,n=>ni(n))}async getNotifications(e={},t){return await(await this.getNotificationsRaw(e,t)).value()}async getNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling getNotificationsById().');const o={},a={};if(this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"GET",headers:a,query:o},t);return new j(n,s=>xe(s))}async getNotificationsById(e,t){return await(await this.getNotificationsByIdRaw(e,t)).value()}async patchNotificationsRaw(e,t){if(e.notificationBulkPatch==null)throw new se("notificationBulkPatch",'Required parameter "notificationBulkPatch" was null or undefined when calling patchNotifications().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const n=this.configuration.accessToken,s=await n("bearerToken",[]);s&&(a.Authorization=`Bearer ${s}`)}const r=await this.request({path:"/notifications",method:"PATCH",headers:a,query:o,body:li(e.notificationBulkPatch)},t);return new j(r,n=>di(n))}async patchNotifications(e,t){return await(await this.patchNotificationsRaw(e,t)).value()}async patchNotificationsByIdRaw(e,t){if(e.id==null)throw new se("id",'Required parameter "id" was null or undefined when calling patchNotificationsById().');const o={},a={};if(a["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){const s=this.configuration.accessToken,c=await s("bearerToken",[]);c&&(a.Authorization=`Bearer ${c}`)}let r="/notifications/{id}";r=r.replace("{id}",encodeURIComponent(String(e.id)));const n=await this.request({path:r,method:"PATCH",headers:a,query:o,body:fi(e.notificationPatch)},t);return new j(n,s=>mi(s))}async patchNotificationsById(e,t){return await(await this.patchNotificationsByIdRaw(e,t)).value()}}const yi={Notifications:"notifications"};class Ci{constructor(e){this.noInit=!1,this.configuration=e}get notificationsApi(){return new xi(new He({basePath:`${this.configuration.NotificationApiUrl}/${yi.Notifications}`,headers:{Authorization:this.getAuthorization()}}))}getAuthorization(){return this.configuration.getAuthorizationFn?this.configuration.getAuthorizationFn():""}}const ye=i=>i==null||i==="",_i=i=>{switch(i.toLowerCase()){case"planned maintenance":return m.PLANNED_MAINTENANCE;case"incidents":return m.INCIDENTS;case"dcim alerts":return m.DCIM_ALERTS;case"service tickets":return m.SERVICE_TICKETS;default:return m.PLANNED_MAINTENANCE}},ki=i=>{switch(i.toLowerCase()){case"unread":return N.UNREAD;case"read":return N.READ;default:return N.UNREAD}},Ai=i=>({sort:"-created_at",cursor:i,prefer:[""]}),Ei=(i,e)=>({id:i,notificationPatch:{status:e}}),Ni=i=>({id:i}),Oe=i=>{var e,t,o,a,r,n,s,c;return{subject:(e=i.subject)!=null?e:"",id:i.id,accountNumber:(t=i.accountNumber)!=null?t:"",resourceType:_i((o=i.resourceType)!=null?o:""),subGroup:(a=i.subGroup)!=null?a:"",resourceId:(r=i.resourceId)!=null?r:"",status:ki((n=i.status)!=null?n:""),createdAt:ye(i.createdAt)?F(new Date,Ie):F(i.createdAt,Ie),createdBy:(s=i.createdBy)!=null?s:"",locations:(c=i.locations)!=null?c:[]}},ze=i=>i.map(e=>Oe(e)),Si=i=>{const e=new URLSearchParams(i),t=e.has("cursor")?e.get("cursor"):"";return t!==null?t:""},Y=async(i,e=!0)=>{let t="An error occurred";if(i instanceof Ve&&i.response.status===400)try{const{detail:o}=await i.response.json();t=o,e&&console.error(t)}catch(o){console.error(i)}else console.error(i)},Mi=i=>{const e=localStorage.getItem(i);return e?JSON.parse(e):null},$i=i=>{var e;return`Bearer ${(e=Mi(i))==null?void 0:e.access_token}`};let Ti=class{constructor(){this.showDrawer=!1,this.apiClient={noInit:!0},this.baseApiUrl="",this.localStorageKey="",this.NewApiClient=()=>{this.apiClient=new Ci({NotificationApiUrl:this.baseApiUrl,getAuthorizationFn:()=>$i(this.localStorageKey)}),this.getNotifications()},this.nextPageCursor="",this.notifications=[],this.unreadNotificationCount=0,this.notificationFilters={SHOW_PLANNED_MAINTENANCE:!0,SHOW_SERVICE_TICKETS:!0,SHOW_DCIM_ALERTS:!0},this.selectedNotification={id:"",resourceType:m.PLANNED_MAINTENANCE,subGroup:"",subject:"",resourceId:"",locations:[],createdAt:"",accountNumber:"",createdBy:"",status:N.READ},this.dateFilters={FROM_DATE:wt(new Date,Qt),TO_DATE:new Date},dt(this),ht(this,{name:"notification-state",properties:["notificationFilters","nextPageCursor"],storage:window.localStorage})}get isHydrated(){return pt(this)}async hydrateStore(){await mt(this)}async clearStoredData(){await gt(this)}async getStoredData(){return ft(this)}ConstructApiClient(){return this.apiClient.noInit?this.NewApiClient():this.apiClient}async clearStoredNotificationsData(){this.notifications=[],this.unreadNotificationCount=0,this.nextPageCursor="",this.apiClient={noInit:!0}}async setNotificationReadStatus(e){const t=await this.setNotificationAsRead(e.toString());if(await t===!0){this.ReduceUnreadNotificationCount();const o=this.notifications.findIndex(a=>a.id===e);this.notifications[o].status=N.READ,this.selectedNotification=this.notifications[o]}return t}async setNotificationDeleted(e){const t=await this.DeleteNotification(e.toString());if(t===!0){const o=this.notifications.find(r=>r.id===e);(o==null?void 0:o.status)==="unread"&&this.ReduceUnreadNotificationCount();const a=this.notifications.findIndex(r=>r.id===e);this.notifications.splice(a,1)}return{State:t===!0?B.SUCCESS:B.ERROR,Message:t===!0?"Successfully deleted the notification":"Error while deleting the notification"}}setNotificationDateFilter(e,t){e!==void 0?this.dateFilters.FROM_DATE=Ee(e,Q,new Date):this.dateFilters.FROM_DATE=void 0,t!==void 0?this.dateFilters.TO_DATE=Ee(t,Q,new Date):this.dateFilters.TO_DATE=void 0}setNotificationFilter(e,t){switch(e){case m.PLANNED_MAINTENANCE:this.notificationFilters.SHOW_PLANNED_MAINTENANCE=t;break;case m.SERVICE_TICKETS:this.notificationFilters.SHOW_SERVICE_TICKETS=t;break;case m.DCIM_ALERTS:this.notificationFilters.SHOW_DCIM_ALERTS=t;break}}async getNotifications(){var e;let t;if(this.nextPageCursor!==void 0&&(t=await((e=this.apiClient)==null?void 0:e.notificationsApi.getNotificationsRaw(Ai(Si(this.nextPageCursor))).catch(o=>{Y(o,!1)})),t)){const o=await(t==null?void 0:t.value());this.notifications=this.nextPageCursor===""?ze(o==null?void 0:o.items):this.notifications.concat(ze(o==null?void 0:o.items)),this.nextPageCursor=(o==null?void 0:o.next)!==void 0?o==null?void 0:o.next:void 0,this.unreadNotificationCount=t.raw.headers.get("x-total-unread-count")!==null&&t.raw.headers.get("x-total-unread-count")!==void 0?t.raw.headers.get("x-total-unread-count"):0}}async getNotificationsById(e){var t;let o;e&&(o=await((t=this.apiClient)==null?void 0:t.notificationsApi.getNotificationsById({id:e}).catch(a=>{Y(a,!1)}))),o&&(this.selectedNotification=Oe(o))}async setNotificationAsRead(e){var t;return e?(await((t=this.apiClient)==null?void 0:t.notificationsApi.patchNotificationsById(Ei(e,"read")).catch(o=>(Y(o,!1),!1))),!0):!1}async setAllNotificationAsRead(){var e;const t=await((e=this.apiClient)==null?void 0:e.notificationsApi.patchNotifications({notificationBulkPatch:{status:N.READ}}).catch(o=>(Y(o,!1),!1)));return this.notifications=this.notifications.map(o=>({...o,status:N.READ})),this.unreadNotificationCount=0,t}async DeleteNotification(e){var t;let o=!1;return e&&await((t=this.apiClient)==null?void 0:t.notificationsApi.deleteNotificationsById(Ni(e)).catch(a=>{Y(a,!1),o=!1}).then(()=>{o=!0})),o}ReduceUnreadNotificationCount(){this.unreadNotificationCount>0&&(this.unreadNotificationCount-=1)}};const u=new Ti,H=L`:host{--ix-drawer-border-radius:0;--ix-drawer-padding:0;--ix-drawer-width-sm:320px;--ix-drawer-width-md:320px;--ix-drawer-width-lg:400px}.destructive-icon{color:var(--clr-critical,#db0028);--md-icon-button-icon-color:var(--clr-critical, #DB0028);--md-sys-color-on-surface-variant:var(--clr-critical, #DB0028)}.destructive-icon path{fill:var(--clr-critical,#db0028)}.active-icon{color:var(--clr-primary,#1456e0);--md-icon-button-icon-color:var(--clr-primary, #1456E0);--md-sys-color-on-surface-variant:var(--clr-primary, #1456E0)}.active-icon path{fill:var(--clr-primary,#1456e0)}.inactive-icon{color:var(--clr-on-surface,#092241);--md-icon-button-icon-color:var(--clr-on-surface, #092241);--md-sys-color-on-surface-variant:var(--clr-on-surface, #092241);cursor:default;opacity:.6}.inactive-icon path{fill:var(--clr-on-surface,#092241);opacity:.6}ix-icon-button.sharp{--md-icon-font:'Material Symbols Sharp'!important}.ix-icon-groups{--ix-icon-font-size:32px;--ix-icon-line-height:32px}.ix-icon-groups ix-icon{color:var(--clr-on-surface,#092241);opacity:.6}.ix-icon-groups ix-icon path{fill:var(--clr-on-surface,#092241)}.datefilter-dropdown-content,.filter-dropdown-content{position:absolute;right:5%;top:3rem;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:3px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:var(--clr-surface-container-lowest,#fff)}.unread{font-family:var(--root-primary-font, 'sans-serif');padding:0 5px;font-size:var(--text-caption-size,.75rem);line-height:var(--text-caption-line-height,1.33333333em);left:22px;top:0;background:var(--clr-critical,#db0028);letter-spacing:var(--text-caption-letter-spacing,.03333333em)}.notification-tooltip{background-color:var(--cp-neutral-blue-4,#040d19);white-space:nowrap;font-size:var(--text-caption-size,.75rem);z-index:9999;color:var(--clr-on-secondary,#fff)}.notification-modal-subtitle,.notification-modal-title{color:var(--clr-on-surface,#092241);font-family:var(--root-secondary-font, 'sans-serif')}.notification-modal-subtitle{font-size:var(--text-heading-size,1.25rem);line-height:var(--text-heading-line-height,1.2em)}.notification-modal-content{display:inline-grid;grid-template-columns:fit-content(183px) 1fr;grid-template-rows:auto auto;grid-column-gap:24px;grid-row-gap:8px;font-family:var(--root-primary-font, 'sans-serif');font-size:var(--text-default-size,16px);line-height:28px;width:560px;padding-bottom:16px;color:var(--clr-on-surface,#092241)}.notification-modal-content-title{width:183px;color:var(--clr-on-surface-variant,#092241B3)}.notification-modal-subject-title{grid-area:1/1/2/2}.notification-modal-subject-text{grid-area:1/2/2/3}.notification-modal-created-date-title{grid-area:2/1/3/2}.notification-modal-created-date-text{grid-area:2/2/3/3}.notification-modal-site-title{grid-area:3/1/4/2}.notification-modal-site-text{grid-area:3/2/4/3}`;let le=class extends M{constructor(){super(...arguments),this.textMessage="Are you sure?",this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("confirm-dialog-closed")),this.onClick(!1)}}static get styles(){return[k,H]}onClick(e){const t=new CustomEvent("on-confirm-selection",{detail:{returnValue:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}render(){return l` <ix-dialog ?open="${this.open}" class="w-[580px]" @closed="${this.dialogClosed}"> <div slot="headline">${this.textMessage}</div> <div slot="actions"> <div class="flex flex-row justify-end p-1"> <ix-button name="cancel" appearance="text" @click="${()=>this.onClick(!1)}">DISMISS</ix-button> <ix-button name="confirm" appearance="text" @click="${()=>this.onClick(!0)}">YES</ix-button> </div> </div> </ix-dialog>`}};p([C({type:String,attribute:!0})],le.prototype,"textMessage",void 0),p([C({type:Boolean,attribute:!0})],le.prototype,"open",void 0),le=p([R("confirmation-dialog")],le);let ce=class extends M{constructor(){super(...arguments),this.notification={},this.open=!1,this.dialogClosed=()=>{this.dispatchEvent(new CustomEvent("view-item-dialog-closed"))},this.viewRecord=()=>{this.dialogClosed(),u.showDrawer=!1}}static get styles(){return[k,H]}getUrl(){const e=this.notification.resourceId;switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return`/service-management/reports?ticketId=${e}`;case m.SERVICE_TICKETS:switch(this.notification.subGroup){case w.Remote_Hands:return`/service-management/service-tickets/remote-hands/${e}`;case w.Customer_Care:return`/service-management/service-tickets/customer-care/${e}`;case w.Deliveries:return`/service-management/service-tickets/${w.Deliveries}/${e}`;case w.Facility_Access:return`/service-management/service-tickets/facility-access/${e}`;case w.Removals:return`/service-management/service-tickets/removals/${e}`;case w.Trouble_Ticket:return`/service-management/service-tickets/trouble-tickets/${e}`;case w.FacilityAccessVisitorAccess:return`/service-management/service-tickets/facility-access/visitor-access/${e}`;case w.FacilityAccessPermanentBadge:return`/service-management/service-tickets/facility-access/permanent-badge/${e}`;case w.FacilityAccessOspAccess:return`/service-management/service-tickets/facility-access/osp-access/${e}`;case w.FacilityAccessPopPoeAccess:return`/service-management/service-tickets/facility-access/pop-poe-access/${e}`;default:return""}case m.INCIDENTS:return`/service-management/reports?ticketId=${e}`;case m.DCIM_ALERTS:return`/dcim/${e}`;default:return""}}getLocation(){return this.notification.locations===void 0||this.notification.locations.length<1?"":this.notification.locations.length>1?"Multiple Sites":this.notification.locations[0]}getSubGroupDisplayName(){switch(this.notification.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";case"Incidents (GSN)":return"Incidents";case"Emergency Repairs (InSite 1.0)":return"Emergency Repairs";default:return this.notification.subGroup}}render(){return l` <ix-dialog ?open="${this.open}" @closed="${this.dialogClosed}" class="notification-modal" data-testclass="notification-modal"> <div slot="headline" class="w-[560px]"> <div class="flex flex-col flex-start"> <div class="notification-modal-title text-2xl font-bold text-balance"> ${this.notification.resourceType} </div> <div class="notification-modal-subtitle pt-4 pb-0 font-bold text-balance" data-testid="notification-view-item-ticket-type"> ${this.getSubGroupDisplayName()} </div> </div> </div> <form class="notification-modal-content" slot="content" id="form-id" method="dialog"> <div class="notification-modal-content-title notification-modal-subject-title"> Subject </div> <div class="notification-modal-subject-text font-normal text-wrap" data-testid="notification-view-item-subject"> ${this.notification.subject} </div> <div class="notification-modal-content-title notification-modal-created-date-title"> Create Date </div> <div class="notification-modal-created-date-text font-normal text-wrap" data-testid="notification-view-item-date"> ${F(new Date(this.notification.createdAt),"dd/MM/yyyy HH:mm:ss")} </div> <div class="notification-modal-content-title notification-modal-site-title"> Site </div> <div class="notification-modal-site-text font-normal text-wrap" data-testid="notification-view-item-site-text"> ${this.getLocation()} </div> </form> <div slot="actions" class="flex flex-row flex-end"> <ix-button data-testid="notification-view-item-close" form="form-id" appearance="text"> Close </ix-button> <ix-button data-testid="notification-view-item-view-record" href="${this.getUrl()}" @click="${this.viewRecord}" appearance="text">View Record</ix-button> </div> </ix-dialog>`}};p([C({type:Object,attribute:!1})],ce.prototype,"notification",void 0),p([C({type:Boolean,attribute:!0})],ce.prototype,"open",void 0),ce=p([R("view-item-dialog")],ce);let P=class extends M{constructor(){super(...arguments),this.disabled=!1,this.read=!1,this.notification={},this.showModal=!1,this.showDeleteConfirmation=!1}static get styles(){return[k,H]}displayItem(){this.notification.status===N.UNREAD&&(u.setNotificationReadStatus(this.notification.id),this.read=!0),this.showModal=!0}deleteItem(){this.disabled||(this.showDeleteConfirmation=!0)}confirmedDelete(e){e.detail.returnValue&&u.setNotificationDeleted(this.notification.id).then(t=>{this.showDeleteResultMessage(t,this.notification.id)}),this.showDeleteConfirmation=!1}showDeleteResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-delete-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:2e3,durationOut:2e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}calculateDuration(){return this.notification.createdAt!==void 0?he(new Date,new Date(this.notification.createdAt))<24?bt(new Date(this.notification.createdAt),new Date,{addSuffix:!0}):l`<ix-date type="static" variant="date-time" .value="${this.notification.createdAt}"></ix-date>`:"N/A"}getNotificationIcon(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return Le;case m.SERVICE_TICKETS:return"sync_saved_locally";case m.INCIDENTS:return"report";case m.DCIM_ALERTS:return Te;default:return"sync_saved_locally"}}getNotificationTitle(){switch(this.notification.resourceType){case m.PLANNED_MAINTENANCE:return"Planned Maintenance";case m.SERVICE_TICKETS:return`${this.getServiceTicketSubGroup()} Service Ticket Update`;case m.INCIDENTS:return"Emergency Repair";case m.DCIM_ALERTS:return"DCIM Alert";default:return"sync_saved_locally"}}getServiceTicketSubGroup(){var e,t;switch((e=this.notification)==null?void 0:e.subGroup){case w.FacilityAccessVisitorAccess:case w.FacilityAccessPermanentBadge:case w.FacilityAccessOspAccess:case w.FacilityAccessPopPoeAccess:return"Facility Access";default:return(t=this.notification)==null?void 0:t.subGroup}}render(){return l` <div data-testid="notification-item" class="relative notification-item"> <div class="hover:bg-[rgba(0,0,0,0.04)] p-2 pl-3.5 flex gap-3 relative cursor-pointer items-center font-bold ${this.read?"notification-item-read border-l-3 border-transparent":"notification-item-unread border-l-3 border-success"}"> <ix-icon style="--ix-icon-font-size:24px;--ix-icon-line-height:24px" icon="${this.getNotificationIcon()}" class="${this.read?"inactive-icon":"active-icon"}" @click="${this.displayItem}">${this.getNotificationIcon()} </ix-icon> <div class="flex flex-col grow" @click="${this.displayItem}"> <div class="grow text-base"> <h2 class="dlr-text-caption">${this.getNotificationTitle()}</h2> </div> <div class="grow text-xs"> <h3 class="dlr-text-caption text-on-surface-disabled"> ${this.calculateDuration()} </h3> </div> </div> <div> <view-item-dialog ?open="${this.showModal}" .notification="${this.notification}" @view-item-dialog-closed="${()=>{this.showModal=!1}}"> </view-item-dialog> <confirmation-dialog ?open="${this.showDeleteConfirmation}" @on-confirm-selection="${this.confirmedDelete}" @confirm-dialog-closed="${()=>{this.showModal=!1}}" textMessage="Are you sure you want to delete this notification?" data-testclass="notification-delete-confirmation"> </confirmation-dialog> </div> <ix-icon-button style="--md-icon-button-icon-size:24px" data-testclass="delete-notification" @click="${this.deleteItem}" @mouseover="${e=>{this.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:this.disabled?"Emergency Repair Notification cannot be removed":"Remove Notification",target:e.target}}))}}" @mouseout="${()=>this.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" ?disabled="${this.disabled}"> <ix-icon slot="default" class="${this.disabled?"inactive-icon":"destructive-icon"}"> ${Kt} </ix-icon> </ix-icon-button> </div> </div> `}};p([C({type:Boolean})],P.prototype,"disabled",void 0),p([C({type:Boolean})],P.prototype,"read",void 0),p([C({type:Object,attribute:!1})],P.prototype,"notification",void 0),p([E()],P.prototype,"showModal",void 0),p([E()],P.prototype,"showDeleteConfirmation",void 0),P=p([R("notification-item")],P);let U=class extends M{constructor(){super(...arguments),this.groupTitle="Group 1",this.groupIcon="public",this.childItems=u.notifications,this.isOpen=!1,this.onClick=()=>{this.isOpen=!this.isOpen}}static get styles(){return[k,H]}renderNotificationItems(){var e,t,o;return this.isOpen?((e=this.childItems)==null?void 0:e.length)!==void 0&&((t=this.childItems)==null?void 0:t.length)>0?l`<div> ${(o=this.childItems)==null?void 0:o.map(a=>l`<notification-item .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}" data-testclass="notification-item"> </notification-item>`)} </div>`:l`<p class="dlr-text-caption ml-14 font-bold mr-4" data-testid="msg-no-notifications"> No notifications yet. </p>`:l`${v}`}render(){var e;return l`<div class="group-container-row border-b border-outline py-3"> <div class="flex items-center justify-between"> <div class="flex items-center align-middle"> <ix-icon-button icon="${this.isOpen?"arrow_drop_down":"arrow_right"}" @click="${this.onClick}" data-testclass="grouped-item-toggle-expand"> </ix-icon-button> <ix-icon slot="default" class="ix-icon-groups">${vt(this.groupIcon)}</ix-icon> <p class="m-0 group-name font-bold pl-1">${this.groupTitle}</p> <p class="m-0 pl-4"> ${(e=this.childItems)==null?void 0:e.length.toString().padStart(2,"0")} </p> </div> </div> ${this.renderNotificationItems()} </div>`}};p([C({type:String,attribute:!0})],U.prototype,"groupTitle",void 0),p([C({type:String,attribute:!0})],U.prototype,"groupIcon",void 0),p([C({type:Array,attribute:!0})],U.prototype,"childItems",void 0),p([E()],U.prototype,"isOpen",void 0),U=p([R("grouped-item")],U);let Fe=class extends M{static get styles(){return[k,H]}onSwitchChange(e){var t;const o=e.target,a=(t=o.attributes.getNamedItem("name"))==null?void 0:t.value;u.setNotificationFilter(a,o.selected),this.requestUpdate()}render(){return l` <div class="flex flex-col"> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="planned-maintenance-switch" class="flex" name="${m.PLANNED_MAINTENANCE}" selected="${u.notificationFilters.SHOW_PLANNED_MAINTENANCE}" @change="${this.onSwitchChange}"></ix-switch> <span>Planned Maintenance</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="service-tickets-switch" class="flex" name="${m.SERVICE_TICKETS}" selected="${u.notificationFilters.SHOW_SERVICE_TICKETS}" @change="${this.onSwitchChange}"></ix-switch> <span>Service Ticket Updates</span></label> <label class="whitespace-nowrap p-2 flex gap-3 items-center hover:bg-primary-subtle"> <ix-switch data-testid="dcim-alerts-switch" class="flex" name="${m.DCIM_ALERTS}" selected="${u.notificationFilters.SHOW_DCIM_ALERTS}" @change="${this.onSwitchChange}"></ix-switch> <span>${m.DCIM_ALERTS}</span></label> </div>`}};Fe=p([R("group-filters")],Fe);let O=class extends M{constructor(){super(...arguments),this.fromDate=ye(u.dateFilters.FROM_DATE)?void 0:F(u.dateFilters.FROM_DATE,Q),this.toDate=ye(u.dateFilters.TO_DATE)?void 0:F(u.dateFilters.TO_DATE,Q),this.maxDate=F(new Date,Q),this.fromDateErrorText="",this.toDateErrorText=""}static get styles(){return[k,H]}onFromDateChange(e){e===null||e===""?this.fromDate=void 0:(this.fromDate=e,this.fromDate!==void 0&&(this.fromDateErrorText=void 0))}onToDateChange(e){e===null||e===""?this.toDate=void 0:(this.toDate=e,this.toDate!==void 0&&(this.toDateErrorText=void 0))}onApplyDateFilter(e){if(e){if(this.toDate===void 0&&this.fromDate!==void 0){this.toDateErrorText="Please select to date";return}if(this.fromDate===void 0&&this.toDate!==void 0){this.fromDateErrorText="Please select from date";return}if(this.fromDate>this.toDate){this.fromDateErrorText="From date cannot be later than To date.",this.fromDate=void 0;return}if(this.fromDateErrorText=void 0,this.toDate<this.fromDate){this.toDateErrorText="To date cannot be earlier than From date.",this.toDate=void 0;return}this.toDateErrorText=void 0}const t=e&&this.toDateErrorText===void 0&&this.fromDateErrorText===void 0;t&&(u.setNotificationDateFilter(this.fromDate,this.toDate),this.requestUpdate());const o=new CustomEvent("on-selection",{detail:{returnValue:t},bubbles:!0,composed:!0});this.dispatchEvent(o)}clearDateFilters(){this.fromDate=void 0,this.toDate=void 0,this.fromDateErrorText=void 0,this.toDateErrorText=void 0}render(){return l` <div class="flex flex-col p-4"> <div class="flex flex-row items-center"> <div class="grow items-center text-xl font-bold">Filter by Date</div> <div class="flex flex-row items-center" @click="${this.clearDateFilters}"> <label class="grow text-sm text-right pr-1 cursor-pointer">Clear Filter</label> <ix-icon-button data-testid="notifications-clear-date-filter" small appearance="default" icon="domain_verification_off" class="active-icon"></ix-icon-button> </div> </div> <ix-divider class="my-2"></ix-divider> <div class="flex xl:flex-row lg:flex-col md:flex-col sm:flex-col justify-between item-center my-4"> <div class="flex gap-2"> <ix-date data-testid="notifications-from-date" .value="${this.fromDate}" max="${this.maxDate}" label="From" name="FromDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onFromDateChange(e)}"> </ix-date> <ix-date data-testid="notifications-to-date" .value="${this.toDate}" max="${this.maxDate}" label="To" name="ToDate" .errorText="${this.toDateErrorText}" .onChanged="${e=>this.onToDateChange(e)}"></ix-date> </div> </div> <div class="flex flex-row justify-between"> <ix-button data-testid="notifications-cancel-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!1)}">Cancel</ix-button> <ix-button data-testid="notifications-activate-date-filter" type="" target="" appearance="text" @click="${()=>this.onApplyDateFilter(!0)}">Filter List</ix-button> </div> </div>`}};p([E()],O.prototype,"fromDate",void 0),p([E()],O.prototype,"toDate",void 0),p([E()],O.prototype,"maxDate",void 0),p([E()],O.prototype,"fromDateErrorText",void 0),p([E()],O.prototype,"toDateErrorText",void 0),O=p([R("date-filters")],O);let q=class extends M{constructor(){super(...arguments),this.isVisible=!1,this.label="",this.hoveredElement=void 0,this.configureNotificationTooltip=e=>{const{label:t,target:o}=e.detail;this.hoveredElement=o,this.label=t,this.isVisible=!0},this.hideNotificationTooltip=()=>{this.isVisible=!1,this.hoveredElement=void 0,this.label=""}}static get styles(){return[k,H]}connectedCallback(){super.connectedCallback(),window.addEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.addEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("show-notification-tooltip",this.configureNotificationTooltip),window.removeEventListener("hide-notification-tooltip",this.hideNotificationTooltip)}updated(e){e.has("hoveredElement")&&this.isVisible&&this.hoveredElement&&Ne(this.hoveredElement,this.notificationTooltip,{placement:"bottom-end"}).then(({x:t,y:o})=>{this.notificationTooltip.style.left=`${t}px`,this.notificationTooltip.style.top=`${o+12}px`})}render(){const e={hidden:!this.isVisible};return l`<div class="notification-tooltip z-[9999] rounded absolute p-2 white-text ${xt(e)}"> ${this.label} </div> <slot></slot>`}};p([W(".notification-tooltip")],q.prototype,"notificationTooltip",void 0),p([C({type:Boolean,reflect:!0})],q.prototype,"isVisible",void 0),p([C({type:String,reflect:!0})],q.prototype,"label",void 0),p([E()],q.prototype,"hoveredElement",void 0),q=p([R("notification-tooltip")],q);class S extends M{constructor(){super(...arguments),this.showGroupedView=!1,this.showFilters=!1,this.showDateFilters=!1,this.showMarkAllReadConfirmation=!1,this.baseApiUrl="",this.localStorageKey=""}async firstUpdated(){u.baseApiUrl=this.baseApiUrl,u.localStorageKey=this.localStorageKey,u.ConstructApiClient()}connectedCallback(){super.connectedCallback(),window.addEventListener("account-switched",u.NewApiClient),window.addEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.addEventListener("beforeunload",this.handleOnbeforeunload)}disconnectedCallback(){super.disconnectedCallback(),this.handleOnbeforeunload(),window.removeEventListener("account-switched",u.NewApiClient),window.removeEventListener("ix-notifications-toggle-drawer",this.toggleDrawer),window.removeEventListener("beforeunload",this.handleOnbeforeunload)}handleOnbeforeunload(){u.clearStoredNotificationsData()}toggleDrawer(){u.showDrawer=!u.showDrawer,u.showDrawer||(this.showFilters=!1,this.showDateFilters=!1)}markAllread(){u.unreadNotificationCount>0&&(this.showMarkAllReadConfirmation=!0)}async confirmedMarkAllRead(e){if(e.detail.returnValue){try{const t=await u.setAllNotificationAsRead();this.showResultMessage({State:B.SUCCESS,Message:`Successfully marked ${t.updatedCount} notifications as read`},"all-read")}catch(t){this.showResultMessage({State:B.ERROR,Message:"Error while marking the notifications read, Please try again"},"all-read")}this.requestUpdate()}this.showMarkAllReadConfirmation=!1}showResultMessage(e,t){window.dispatchEvent(new CustomEvent("add-toast",{detail:{id:t,content:l` <ix-message-toast data-testid="notification-read-all-toast" toastId="${t}" .TMessageToast="${e.State.toLowerCase()}" forceClose> ${e.Message} </ix-message-toast>`,autoClose:3e3,durationOut:3e3,vertical:"bottom",horizontal:"center",animated:!0,above:!1}}))}toggleGroupView(){this.showGroupedView=!this.showGroupedView}displayFilters(){this.showFilters=!this.showFilters}applyNotificationFilters(){var e;const t=(e=u.notifications)==null?void 0:e.filter(o=>o.resourceType===m.PLANNED_MAINTENANCE&&u.notificationFilters.SHOW_PLANNED_MAINTENANCE===!0||o.resourceType===m.SERVICE_TICKETS&&u.notificationFilters.SHOW_SERVICE_TICKETS===!0||o.resourceType===m.DCIM_ALERTS&&u.notificationFilters.SHOW_DCIM_ALERTS===!0||o.resourceType===m.INCIDENTS);return u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0&&ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):u.dateFilters.FROM_DATE!==void 0&&u.dateFilters.TO_DATE===void 0?t.filter(o=>he(new Date(o.createdAt),u.dateFilters.FROM_DATE)>=0):u.dateFilters.FROM_DATE===void 0&&u.dateFilters.TO_DATE!==void 0?t.filter(o=>ie(new Date(o.createdAt),u.dateFilters.TO_DATE)<=0):t}displayDateFilters(){this.showDateFilters=!this.showDateFilters}renderGroupedView(){const e=this.applyNotificationFilters();return l`<div class="-mx-4 -mt-2"> <grouped-item data-testid="planned-maintenance-group" groupTitle="Planned Maintenance" groupIcon="${Le.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.PLANNED_MAINTENANCE)}"></grouped-item> <grouped-item data-testid="emergency-repairs-group" groupTitle="Emergency Repairs" groupIcon="report" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.INCIDENTS)}"></grouped-item> <grouped-item data-testid="service-ticket-updates-group" groupTitle="Service Ticket Updates" groupIcon="sync_saved_locally" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.SERVICE_TICKETS)}"></grouped-item> <grouped-item data-testid="dcim-alerts-group" groupTitle="${m.DCIM_ALERTS}" groupIcon="${Te.strings[0]}" .childItems="${e==null?void 0:e.filter(t=>t.resourceType===m.DCIM_ALERTS)}"></grouped-item> </div>`}renderDefaultView(){const e=this.applyNotificationFilters(),t=e.filter(a=>ie(new Date(a.createdAt),new Date)===0),o=e.filter(a=>ie(new Date(a.createdAt),new Date)!==0);return(e==null?void 0:e.length)>0?l` <h3>Today</h3> ${t.length>0?l`<div class="-mx-4"> ${t==null?void 0:t.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="today-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} <h3>Earlier</h3> ${o.length>0?l`<div class="-mx-4" data-testid="earlier-notifications"> ${o==null?void 0:o.map(a=>l`<notification-item ?read="${a.status!==N.UNREAD}" data-testclass="earlier-notification" .notification="${a}" ?disabled="${a.resourceType===m.INCIDENTS}"> </notification-item> `)} </div>`:this.renderNoResult()} `:l`<h3>Today</h3> ${this.renderNoResult()}`}renderNoResult(){return l`<p class="dlr-text-caption my-4"> <strong>No notifications yet.</strong> </p>`}handleCloseClick(e){this.showDateFilters=!1,this.showFilters=!1}handleContentScroll(e){e!==null&&e.detail.scrollTop+e.detail.clientHeight>=e.detail.scrollHeight-2&&u.getNotifications()}manageFilterVisibility(e){const t=e.composedPath();this.showFilters&&!t.includes(this.groupFilters)&&!t.includes(this.groupFiltersButton)&&(this.showFilters=!1),this.showDateFilters&&!t.includes(this.dateFilters)&&!t.includes(this.dateFiltersButton)&&(this.showDateFilters=!1)}render(){return l` <notification-tooltip data-testid="notifications-tooltip"> </notification-tooltip> <confirmation-dialog data-testid="notifications-confirm-read-dialog" ?open="${this.showMarkAllReadConfirmation}" @confirm-dialog-closed="${()=>{this.showMarkAllReadConfirmation=!1}}" @on-confirm-selection="${this.confirmedMarkAllRead}" textMessage="Are you sure you want to mark all notifications as read?"> </confirmation-dialog> <ix-drawer data-testid="notifications-drawer" ?isVisible="${u.showDrawer}" .onClosed="${()=>this.toggleDrawer()}" animate-vertical hide-close @on-content-scroll="${this.handleContentScroll}" @click="${this.manageFilterVisibility}" compact="compact"> <div slot="content" class="m-4"> <div class="flex flex-row justify-between grow items-center notification-header-container mb-4"> <h2 data-testid="notifications-heading" class="grow items-center dlr-text-heading"> Notifications </h2> <div class="flex flex-row justify-end grow items-center options" style="--md-icon-button-icon-size:24px"> <ix-icon-button data-testid="notifications-cta-all-read" data-testclass="notifications-cta" @click="${this.markAllread}" @mouseover="${e=>{u.unreadNotificationCount>0&&window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Mark All Read",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="markunread_mailbox" class="${u.unreadNotificationCount<=0?"inactive-icon":"active-icon"}" .disabled="${u.unreadNotificationCount<=0}" filledIcon="true"></ix-icon-button> <ix-icon-button data-testid="notifications-cta-sort-type" data-testclass="notifications-cta" @click="${this.toggleGroupView}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Sort by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" label="Sort by Type"> <ix-icon slot="default">${this.showGroupedView?Jt:"sort"}</ix-icon> </ix-icon-button> <ix-icon-button data-testid="notifications-cta-filter-type" data-testclass="notifications-cta" @click="${this.displayFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Type",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" class="active-icon" id="group-filter-button" label="Filter by Type"> <ix-icon slot="default"> ${Wt} </ix-icon> </ix-icon-button> <div data-testid="notifications-filter-dropdown" class="filter-dropdown-content ${this.showFilters?"active z-50":"hidden"}"> <group-filters></group-filters> </div> <ix-icon-button data-testid="notifications-cta-filter-date" data-testclass="notifications-cta" @click="${this.displayDateFilters}" @mouseover="${e=>{window.dispatchEvent(new CustomEvent("show-notification-tooltip",{detail:{label:"Filter by Date",target:e.target}}))}}" @mouseout="${()=>window.dispatchEvent(new CustomEvent("hide-notification-tooltip"))}" icon="date_range" class="active-icon" filledIcon="true" id="date-filters-button" label="Filter by Date"></ix-icon-button> <div data-testid="notifications-date-filter-dropdown" class="datefilter-dropdown-content ${this.showDateFilters?"active z-50":"hidden"}" @on-selection="${this.handleCloseClick}"> <date-filters></date-filters> </div> </div> </div> ${this.showGroupedView?this.renderGroupedView():this.renderDefaultView()} </div> </ix-drawer> `}}S.styles=[k,H],p([W("group-filters")],S.prototype,"groupFilters",void 0),p([W("ix-icon-button#group-filter-button")],S.prototype,"groupFiltersButton",void 0),p([W("date-filters")],S.prototype,"dateFilters",void 0),p([W("ix-icon-button#date-filters-button")],S.prototype,"dateFiltersButton",void 0),p([E()],S.prototype,"showGroupedView",void 0),p([E()],S.prototype,"showFilters",void 0),p([E()],S.prototype,"showDateFilters",void 0),p([E()],S.prototype,"showMarkAllReadConfirmation",void 0),p([C({type:String})],S.prototype,"baseApiUrl",void 0),p([C({type:String})],S.prototype,"localStorageKey",void 0),window.customElements.define("ix-notifications",S);const Li=Object.keys(window.registeredApps).map(i=>{const e=window.registeredApps[i],{host:t,blob:o,copyNS:a}=e,r=e.entry?`${t}${e.entry}`:null;return{name:i,path:window.registeredApps[i].path,host:t,blob:o,entry:r,serviceWorker:`${t||""}${e.serviceWorker}`,enabled:window.registeredApps[i].enabled,copyNS:a}}),Ze=()=>{const i=[],e={Error:"Failed to get version info"};return i.push((async()=>{try{const t=await import("/versions.js");return{[pe]:t.default}}catch(t){return{[pe]:e}}})()),window.registeredApps["ui-user-management"].enabled&&i.push((async()=>{try{return{"ui-user-management":(await import("ui-user-management/versions.js")).default}}catch(t){return{"ui-user-management":e}}})()),window.registeredApps["ui-service-management"].enabled&&i.push((async()=>{try{return{"ui-service-management":(await import("ui-service-management/versions.js")).default}}catch(t){return{"ui-service-management":e}}})()),window.registeredApps["ui-inventory"].enabled&&i.push((async()=>{try{return{"ui-inventory":(await import("ui-inventory/versions.js")).default}}catch(t){return{"ui-inventory":e}}})()),window.registeredApps["ui-sites"].enabled&&i.push((async()=>{try{return{"ui-sites":(await import("ui-inventory/versions.js")).default}}catch(t){return{"ui-sites":e}}})()),window.registeredApps["ui-launchpad"].enabled&&i.push((async()=>{try{return{"ui-launchpad":(await import("ui-launchpad/versions.js")).default}}catch(t){return{"ui-launchpad":e}}})()),window.registeredApps["ui-dcim-charts"].enabled&&i.push((async()=>{try{return{"ui-dcim-charts":(await import("ui-mfe-dcim/versions.js")).default}}catch(t){return{"ui-dcim-charts":e}}})()),window.registeredApps["ui-my-account"].enabled&&i.push((async()=>{try{return{"ui-my-account":(await import("ui-my-account/versions.js")).default}}catch(t){return{"ui-my-account":e}}})()),window.registeredApps["ui-dcim-reports"].enabled&&i.push((async()=>{try{return{"ui-dcim-reports":(await import("ui-mfe-reports/versions.js")).default}}catch(t){return{"ui-dcim-reports":e}}})()),window.registeredApps["ui-gom"].enabled&&i.push((async()=>{try{return{"ui-gom":(await import("http://localhost:8090/versions.js")).default}}catch(t){return{"ui-gom":e}}})()),Promise.all(i)},Ii=async()=>{const i=await Ze();return console.log(JSON.stringify(i,void 0,2)),i},Hi=i=>Li.find(e=>{const t=Array.isArray(e.path)?e.path:[e.path];return e.enabled&&t.some(o=>i.startsWith(o))}),Vi=async()=>{const i=await _t();if(!i)return;window.dataLayer=[{environmentType:kt,hashedUserId:i}];const e=document.createElement("script");e.type="text/javascript",e.text=`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
1549
1454
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
1550
1455
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
1551
1456
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
@@ -1584,4 +1489,4 @@ video {
1584
1489
  `,esgIcon:b`
1585
1490
  <path d="M21 13.5C21 18.47 16.97 22.5 12 22.5C12 17.53 16.03 13.5 21 13.5ZM3 13.5C7.97 13.5 12 17.53 12 22.5C7.03 22.5 3 18.47 3 13.5ZM5.44043 15.9404C6.15045 17.84 7.65999 19.3496 9.55957 20.0596C8.85955 18.16 7.34002 16.6504 5.44043 15.9404ZM18.5596 15.9404C16.66 16.6405 15.1504 18.16 14.4404 20.0596C16.34 19.3496 17.8496 17.84 18.5596 15.9404ZM12 1.5C13.31 1.5 14.4402 2.30996 14.9102 3.45996C15.0501 3.43998 15.19 3.42969 15.3398 3.42969C17.0698 3.42969 18.4805 4.84031 18.4805 6.57031C18.4804 7.2802 18.2395 7.96008 17.8096 8.5C18.2295 9.03992 18.4804 9.7198 18.4805 10.4297C18.4805 12.1597 17.0698 13.5703 15.3398 13.5703C15.1999 13.5703 15.0501 13.56 14.9102 13.54C14.4402 14.69 13.31 15.5 12 15.5C10.69 15.5 9.55984 14.69 9.08984 13.54C8.94994 13.56 8.81004 13.5703 8.66016 13.5703C6.92016 13.5703 5.50977 12.1597 5.50977 10.4297C5.50984 9.7198 5.76049 9.03992 6.19043 8.5C5.77049 7.96008 5.5196 7.2802 5.51953 6.57031C5.51953 4.84031 6.93016 3.42969 8.66016 3.42969C8.80006 3.42969 8.94994 3.43998 9.08984 3.45996C9.55984 2.30996 10.69 1.5 12 1.5ZM13.0303 11.3096C12.7103 11.4296 12.36 11.5 12 11.5C11.6401 11.5 11.3004 11.4295 10.9805 11.3096L10.8604 12.4004C10.8806 13.0102 11.3801 13.5 12 13.5C12.6199 13.5 13.1194 13.0102 13.1396 12.4004L13.0303 11.3096ZM14.9502 8.96973C14.8302 9.70973 14.4396 10.3498 13.8896 10.7998L14.7002 11.3701C14.8801 11.5 15.1 11.5703 15.3398 11.5703C15.9698 11.5703 16.4902 11.0599 16.4902 10.4199C16.4902 9.97995 16.2301 9.57964 15.8301 9.38965L14.9502 8.96973ZM8.16992 9.40039C7.77007 9.60041 7.50957 9.99004 7.51953 10.4199C7.51953 11.0499 8.03016 11.5596 8.66016 11.5596C8.88992 11.5595 9.10974 11.4901 9.30957 11.3604L10.1201 10.8096C9.5603 10.3597 9.16988 9.72023 9.0498 8.98047L8.16992 9.40039ZM8.66016 5.42969C8.03016 5.42969 7.50977 5.94031 7.50977 6.57031C7.50989 7.0101 7.77014 7.39962 8.16992 7.59961L9.0498 8.01953C9.16989 7.27971 9.56046 6.64034 10.1104 6.19043L9.2998 5.62988C9.11988 5.5 8.90001 5.42972 8.66016 5.42969ZM15.3398 5.42969C15.11 5.42972 14.8903 5.50006 14.6904 5.62988L13.8701 6.19043C14.4299 6.64034 14.8204 7.27982 14.9404 8.01953L15.8203 7.59961C16.23 7.3996 16.4804 7.01004 16.4805 6.57031C16.4805 5.94031 15.9698 5.42969 15.3398 5.42969ZM12 3.5C11.3801 3.5 10.8806 3.9898 10.8604 4.59961L10.9805 5.69043C11.3004 5.57049 11.6401 5.5 12 5.5C12.36 5.5 12.7103 5.57043 13.0303 5.69043L13.1396 4.59961C13.1194 3.9898 12.6199 3.5 12 3.5Z" fill="white"/>
1586
1491
  `};var no=Object.defineProperty,so=(i,e,t)=>e in i?no(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ee=(i,e,t)=>so(i,typeof e!="symbol"?e+"":e,t);const lo=[Pt,Ot,zt];class co extends M{constructor(){super(),ee(this,"topNavigationItems",[{enabled:this._getMfeEnabled("ui-launchpad"),href:"/",title:"Launchpad",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.launchpadIcon} </svg> `},{enabled:!1,href:"/service-management/",inactiveOn:["/service-management/reports","/service-management/incidents"],basePath:"/service-management",title:"Service Tickets",mfeName:"ui-service-management",permissionData:{permissionTypes:$t},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.serviceTicketsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/inventory",basePath:"/inventory",title:"Inventory",mfeName:"ui-gom",permissionData:{permissionTypes:Tt},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.inventoryIcon} </svg> `},{enabled:this._getMfeEnabled("ui-gom"),href:"/order-management",basePath:"/order-management",title:"Order Management",mfeName:"ui-gom",permissionData:{permissionTypes:Lt},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.orderManagementIcon} </svg> `},{enabled:!1,href:"/inventory/sites",basePath:"/inventory",title:"Sites",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.sitesIcon} </svg> `},{enabled:this._getMfeEnabled("ui-sites"),href:"/sites/sites",basePath:"/sites",title:"Sites",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.sitesIcon} </svg> `},{enabled:!1,href:"",title:"Reports, Maintenance & Incident Notifications",alt_href:["/service-management/reports","/service-management/incidents","/reports/dcim"],mfeName:"ui-dcim-reports",permissionData:{permissionTypes:It,urls:[{href:"/reports/security",requiredPermission:"Security",order:0},{href:"/reports/dcim",requiredPermission:"DCIM",order:1},{href:"/service-management/reports",requiredPermission:"Planned Site Maintenance",order:2}]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.reportsIcon} </svg> `},{enabled:this._getMfeEnabled("ui-knowledge-base"),href:"/knowledge-base",title:"Knowledge Base",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.knowledgeBaseIcon} </svg> `},{enabled:this._getMfeEnabled("ui-esg"),href:"/esg-reporting",title:"ESG Reporting",mfeName:"ui-esg",permissionData:{permissionTypes:[Ht]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.esgIcon} </svg> `},{enabled:this._getMfeEnabled("ui-my-account"),href:"/my-account",title:"My Account",icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.myAccountIcon} </svg> `}]),ee(this,"bottomNavigationItems",[{enabled:!1,href:"/user-management/user-management",title:"User Management",mfeName:"ui-user-management",permissionData:{permissionTypes:[Vt,Dt,Rt]},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.userManagementIcon} </svg> `},{enabled:!1,href:"/user-management/role-management",title:"Role Management",mfeName:"ui-user-management",permissionData:{permissionTypes:lo},icon:l` <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.roleManagementIcon} </svg> `}]),ee(this,"subscriptionDisposer"),ee(this,"setMobileNav",async()=>{const e=this.mobileNav.offsetHeight;document.body.style.setProperty("--mobile-nav-height",`${e}px`)}),ee(this,"handleMenuMobileScroll",()=>{this.mobileNav.offsetHeight&&!this.compact&&this.toggleCompact(!0)}),this.dataLoaded=!1,this.permissions={},this.isDevMode=!1}static get styles(){return[Ue,k]}static get properties(){return{compact:{type:Boolean},tooltipText:{type:String},tooltip:{type:String},dataLoaded:{type:Boolean},isDevMode:{type:Boolean}}}_getMfeEnabled(e){var t;return!!((t=window.registeredApps[e])!=null&&t.enabled)}async firstUpdated(){this.mobileNav=this.shadowRoot.querySelector("#mobileNav"),window.addEventListener(I.VaadinRouterLocationChanged,()=>{this.requestUpdate()}),this.tooltip=this.shadowRoot.querySelector(".tooltip"),this.updateNavItemStates(J.permissions),this.subscriptionDisposer=ut(()=>J.permissions,o=>{this.updateNavItemStates(o),this.requestUpdate()});const e=await import("/versions.js"),{env:t}=e.default;this.isDevMode=t.startsWith("t")}updateNavItemStates(e){this.topNavigationItems=this.topNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.bottomNavigationItems=this.bottomNavigationItems.map(t=>this.setNavigationItemVisibility(t,e)),this.permissions=e}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.setMobileNav),window.addEventListener("scroll",this.handleMenuMobileScroll)}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("resize",this.setMobileNav),window.removeEventListener("scroll",this.handleMenuMobileScroll),(e=this.subscriptionDisposer)==null||e.call(this)}toggleCompact(e){this.dispatchEvent(new CustomEvent("toggle-menu",{bubbles:!0,composed:!0,detail:{isCompact:e}}))}handleMouseOver(e,t){if(this.compact){const o=e.currentTarget;this.tooltipText=t,Ne(o,this.tooltip,{placement:"right",padding:8}).then(({x:a,y:r})=>{this.tooltip.style.display="block",this.tooltip.style.left=`${a+12}px`,this.tooltip.style.top=`${r}px`,this.tooltip.style.transform="translateY(-50%)"})}}updated(){this.setMobileNav(),setTimeout(()=>{this.setMobileNav()},2e3)}resetScrollPosition(){document.querySelector("gp-bootstrap").shadowRoot.querySelector("global-portal-app").shadowRoot.querySelector("#mfeContainer").scrollTo(0,0)}handleMouseOut(){this.tooltipText="",this.tooltip.style.display="none"}_isActiveItem(e){var t;const o=window.location.pathname,a=e.inactiveOn&&e.inactiveOn.some(r=>new RegExp(r).test(o));return(e.href===o||o.startsWith(e.basePath)||((t=e.alt_href)==null?void 0:t.find(r=>r===o)))&&!a}setNavigationItemVisibility(e,t){if(!e.permissionData)return e;const{mfeName:o}=e;let{href:a}=e;const{permissionTypes:r,urls:n}=e.permissionData;let s=!1;if(s=this._getMfeEnabled(o)&&r.some(c=>t[c]),s&&n&&n.length){const c=n.sort((h,d)=>h.order<d.order?-1:1).find(h=>t[h.requiredPermission]);a=c?c.href:a}return{...e,enabled:s,href:a}}renderNavigation(e){return l` ${e.map(t=>t.enabled?l` <li class="relative rounded-md ${this._isActiveItem(t)?"bg-white bg-opacity-[.16] pointer-events-none":"hover:bg-white hover:bg-opacity-[.16]"}"> <a href="${t.href}" @mouseover="${o=>this.handleMouseOver(o,t.title)}" @mouseout="${this.handleMouseOut}" @click="${()=>{this.resetScrollPosition(),window.innerWidth<1200&&this.toggleCompact()}}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0 opacity-60">${t.icon}</div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">${t.title}</div> </div> </div> </a> </li> `:v)} `}render(){return l` <nav id="mobileNav" class="nav-bar wide relative z-1 lg:hidden md:p-2 md:pb-0 lg:pb-2"> <div class="nav-bar-bg p-4 md:py-3 md:m-2 md:rounded-xl flex items-center justify-between"> <div class="w-[20%]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="menu" class="on-primary-icon"></ix-icon-button> </div> <div class="w-[178px]"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px] hidden sm:block"> ${y.digitalRealtyLogoWithText} </svg> </div> <div class="flex items-center gap-[18px] w-[20%] justify-end"> <notifications-icon mobile></notifications-icon> <user-profile-ui mobile></user-profile-ui> </div> </div> </nav> <div class="lg:h-full"> <div class="${this.compact?"left-[-300px] lg:w-[--left-bar-width-lg] md:w-[--open-menu-width-md]":"left-0 md:left-4 w-[--open-menu-width-md]"} lg:h-full absolute lg:relative lg:left-0 animate-width lg:w-auto"> <div class="md:h-full h-[--main-height]"> <div class="tooltip text-white p-1 rounded absolute z-50" style="display:none;background-color:#071454;white-space:nowrap;overflow:hidden;font-size:.75rem"> ${this.tooltipText} </div> <nav class="h-full md:mt-2 lg:mt-0 lg:p-4 flex flex-col text-center text-white sticky top-[var(--intraportal-nav-height,0)] mb-[calc(var(--intraportal-nav-height,0)*-1)] max-h-[--main-height]"> <ix-icon-button @click="${()=>this.toggleCompact()}" icon="chevron_right" class="nav-toggle drop-shadow-lg items-center expand-cta bg-white rounded-full h-8 w-8 absolute z-20 hidden top-[18px] right-[-14px] lg:right-[0px] lg:top-[45px] sm:flex ${this.compact?"animate-spin-180-backwards":"animate-spin-180-forwards"}"></ix-icon-button> <div class="absolute inset-0 h-[--main-height] md:h-[--main-height-tablet-nav] lg:h-[--main-height]"> <div class="absolute inset-0 lg:inset-4 nav-bar-bg md:rounded-xl drop-shadow"></div> </div> <div class="h-full md:h-[--main-height-tablet-nav] overflow-hidden md:rounded-xl max-h-full nav-bar long animate-width flex flex-col ${this.compact?"closed":""} relative"> <div class="mx-1 my-0 px-6 py-[20px] lg:py-[31px] hidden md:block overflow-hidden shrink-0"> <svg @click="${()=>this.toggleCompact()}" focusable="false" viewBox="0 0 178 27" fill="white" class="w-[178px] h-[27px]"> ${y.digitalRealtyLogoWithText} </svg> </div> <hr class="divider hidden md:block mb-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.topNavigationItems)} </ul> <hr class="divider hidden md:block my-1"> <ul class="p-1 overflow-y-auto overflow-x-hidden"> ${this.renderNavigation(this.bottomNavigationItems)} </ul> <hr class="divider my-1 mt-auto" ?hidden="${!1}"> <ul class="p-1 justify-end overflow-y-auto overflow-x-hidden" ?hidden="${!1}"> ${l` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <div role="button" @mouseover="${e=>this.handleMouseOver(e,"Cookies Settings")}" @mouseout="${this.handleMouseOut}" @click="${this.showCustomiseCookies}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold"> <div class="w-6 shrink-0"> <div class="w-6 shrink-0 opacity-60"> <svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="white"> ${y.cookiesSettingsIcon} </svg> </div> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Cookies Settings</div> </div> </div> </div> </li> `} ${this.isDevMode?l` <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"App Versions")}" @mouseout="${this.handleMouseOut}" @click="${this.showAppVersions}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> fingerprint </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">App versions</div> </div> </div> </button> </li> <li class="relative rounded-md hover:bg-white hover:bg-opacity-[.16]"> <button @mouseover="${e=>this.handleMouseOver(e,"Clear local storage")}" @mouseout="${this.handleMouseOut}" class="items-center flex pl-6 py-3 gap-4 rounded-md font-bold opacity-60" @click="${()=>localStorage.clear()}"> <div class="w-6 shrink-0"> <ix-icon style="--ix-icon-font-size:24px" class="block"> refresh </ix-icon> </div> <div class="grow text-left"> <div class="${this.compact?"md:w-full lg:w-0":"w-full"} animate-width overflow-hidden dlr-text-small font-bold"> <div class="w-[184px]">Clear local storage</div> </div> </div> </button> </li> `:v} </ul> </div> </nav> </div> </div> </div> `}}window.customElements.define("app-shell-navigation-bar",co);try{self["workbox:window:7.3.0"]&&_()}catch(i){}function Qe(i,e){return new Promise(function(t){var o=new MessageChannel;o.port1.onmessage=function(a){t(a.data)},i.postMessage(e,[o.port2])})}function Ye(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,o=Array(e);t<e;t++)o[t]=i[t];return o}function uo(i,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,po(o.key),o)}}function ho(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t)return(t=t.call(i)).next.bind(t);if(Array.isArray(i)||(t=(function(a,r){if(a){if(typeof a=="string")return Ye(a,r);var n={}.toString.call(a).slice(8,-1);return n==="Object"&&a.constructor&&(n=a.constructor.name),n==="Map"||n==="Set"?Array.from(a):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(a,r):void 0}})(i))||e){t&&(i=t);var o=0;return function(){return o>=i.length?{done:!0}:{done:!1,value:i[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1587
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(i,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},Ce(i,e)}function po(i){var e=(function(t,o){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,o);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)})(i,"string");return typeof e=="symbol"?e:e+""}try{self["workbox:core:7.3.0"]&&_()}catch(i){}var _e=function(){var i=this;this.promise=new Promise(function(e,t){i.resolve=e,i.reject=t})};function ke(i,e){var t=location.href;return new URL(i,t).href===new URL(e,t).href}var te=function(i,e){this.type=i,Object.assign(this,e)};function D(i,e,t){return t?e?e(i):i:(i&&i.then||(i=Promise.resolve(i)),e?i.then(e):i)}function mo(){}var go={type:"SKIP_WAITING"};function Xe(i,e){return i&&i.then?i.then(mo):Promise.resolve()}var fo=(function(i){function e(r,n){var s,c;return n===void 0&&(n={}),(s=i.call(this)||this).nn={},s.tn=0,s.rn=new _e,s.en=new _e,s.on=new _e,s.un=0,s.an=new Set,s.cn=function(){var h=s.fn,d=h.installing;s.tn>0||!ke(d.scriptURL,s.sn.toString())||performance.now()>s.un+6e4?(s.vn=d,h.removeEventListener("updatefound",s.cn)):(s.hn=d,s.an.add(d),s.rn.resolve(d)),++s.tn,d.addEventListener("statechange",s.ln)},s.ln=function(h){var d=s.fn,f=h.target,x=f.state,$=f===s.vn,T={sw:f,isExternal:$,originalEvent:h};!$&&s.mn&&(T.isUpdate=!0),s.dispatchEvent(new te(x,T)),x==="installed"?s.wn=self.setTimeout(function(){x==="installed"&&d.waiting===f&&s.dispatchEvent(new te("waiting",T))},200):x==="activating"&&(clearTimeout(s.wn),$||s.en.resolve(f))},s.yn=function(h){var d=s.hn,f=d!==navigator.serviceWorker.controller;s.dispatchEvent(new te("controlling",{isExternal:f,originalEvent:h,sw:d,isUpdate:s.mn})),f||s.on.resolve(d)},s.gn=(c=function(h){var d=h.data,f=h.ports,x=h.source;return D(s.getSW(),function(){s.an.has(x)&&s.dispatchEvent(new te("message",{data:d,originalEvent:h,ports:f,sw:x}))})},function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];try{return Promise.resolve(c.apply(this,h))}catch(f){return Promise.reject(f)}}),s.sn=r,s.nn=n,navigator.serviceWorker.addEventListener("message",s.gn),s}var t,o;o=i,(t=e).prototype=Object.create(o.prototype),t.prototype.constructor=t,Ce(t,o);var a=e.prototype;return a.register=function(r){var n=(r===void 0?{}:r).immediate,s=n!==void 0&&n;try{var c=this;return D((function(h,d){var f=h();return f&&f.then?f.then(d):d(f)})(function(){if(!s&&document.readyState!=="complete")return Xe(new Promise(function(h){return window.addEventListener("load",h)}))},function(){return c.mn=!!navigator.serviceWorker.controller,c.dn=c.pn(),D(c.bn(),function(h){c.fn=h,c.dn&&(c.hn=c.dn,c.en.resolve(c.dn),c.on.resolve(c.dn),c.dn.addEventListener("statechange",c.ln,{once:!0}));var d=c.fn.waiting;return d&&ke(d.scriptURL,c.sn.toString())&&(c.hn=d,Promise.resolve().then(function(){c.dispatchEvent(new te("waiting",{sw:d,wasWaitingBeforeRegister:!0}))}).then(function(){})),c.hn&&(c.rn.resolve(c.hn),c.an.add(c.hn)),c.fn.addEventListener("updatefound",c.cn),navigator.serviceWorker.addEventListener("controllerchange",c.yn),c.fn})}))}catch(h){return Promise.reject(h)}},a.update=function(){try{return this.fn?D(Xe(this.fn.update())):D()}catch(r){return Promise.reject(r)}},a.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(r){try{return D(this.getSW(),function(n){return Qe(n,r)})}catch(n){return Promise.reject(n)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Qe(this.fn.waiting,go)},a.pn=function(){var r=navigator.serviceWorker.controller;return r&&ke(r.scriptURL,this.sn.toString())?r:void 0},a.bn=function(){try{var r=this;return D((function(n,s){try{var c=n()}catch(h){return s(h)}return c&&c.then?c.then(void 0,s):c})(function(){return D(navigator.serviceWorker.register(r.sn,r.nn),function(n){return r.un=performance.now(),n})},function(n){throw n}))}catch(n){return Promise.reject(n)}},(function(r,n,s){return n&&uo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(e,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])})((function(){function i(){this.Pn=new Map}var e=i.prototype;return e.addEventListener=function(t,o){this.jn(t).add(o)},e.removeEventListener=function(t,o){this.jn(t).delete(o)},e.dispatchEvent=function(t){t.target=this;for(var o,a=ho(this.jn(t.type));!(o=a()).done;)(0,o.value)(t)},e.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},i})());const wo=L`h1,h2,h3,h4,h5{margin:0}dl,p{margin:0}a{color:#09c;text-decoration:underline;cursor:pointer}a:hover{color:#007aa3}.main-heading,.subheading{font-family:Museo-300,Arial,sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5rem}.subheading{color:var(--subheading-color,#333);margin-bottom:var(--spacing-small)}.app-footer .subheading{--subheading-color:#fff}.main-heading-frame{--main-heading-color:#fff;padding:var(--spacing-medium) 0 0;background-color:#003d79}.main-heading{padding:0 0 var(--spacing-medium);color:var(--main-heading-color,#09c);font-weight:400;border-bottom:5px solid #09c}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.default-label-note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.small-text{font-size:.875rem;line-height:1.25rem}ul{margin:0;padding:0;list-style-type:none}.bullet-list{list-style-type:disc}.splash-screen-loader-wrapper{display:grid;place-items:center;z-index:1000;background-color:#fff;opacity:1;transition:opacity 2s ease;height:100vh;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.loader{position:relative;display:block;width:.75rem;height:.75rem;margin:4em auto 1.5em;background-color:rgba(255,255,255,0);border-radius:50%;animation:shadowBounce 1s infinite linear}.loader:before{content:"";position:absolute;top:0;left:0;display:block;width:.75rem;height:4px;border-radius:50%;animation:inceptionShadowBounce 1s infinite linear}@keyframes shadowBounce{0%,100%{box-shadow:-2.5em -1em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}10%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}20%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}30%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}40%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1em 0 0 #99ca3c}50%{box-shadow:-2.5em -3em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}60%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -3em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}70%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -3em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}80%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -3em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}90%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -3em 0 0 #99ca3c}}@keyframes inceptionShadowBounce{0%,100%{box-shadow:-2.5em 1em 0 0 #4d7380,-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.35)}10%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 #676767,0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.55)}20%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 grey,1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 rgba(131,131,131,.76)}30%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 #8f8f8f,2.5em 1em 0 0 rgba(131,131,131,.95)}40%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 #838383}50%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.31),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.95)}60%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.31),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.76)}70%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.31),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.55)}80%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.31),2.5em 1em 0 0 rgba(131,131,131,.35)}90%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.31)}}.button-group{list-style-type:none;display:inline-flex;flex-wrap:wrap;padding:.125em;margin:0;border:1px solid #f5f5f5;border-radius:3px;background-color:#f0f0f0}.button-group.-full-width{display:flex}.button-group__item{position:relative;flex:0 0 auto;margin:.125em;text-align:center}.button-group.-full-width>.button-group__item{flex:1 0 7em}.button-group__item>label{display:block;margin:0}.button-group__input{position:absolute;z-index:-10;top:0;left:0;opacity:0}.button-group__label{display:block;padding:.75em 1em;border:1px solid transparent;background-color:#fff;color:#777;border-radius:2px;cursor:pointer}.button-group__label:hover{color:#333}.button-group__input:checked~.button-group__label{border-color:#09c;background-color:#e5f4f9;color:#333;cursor:default}.button-group__input:disabled~.button-group__label,.button-group__input:disabled~.button-group__label:hover{background-image:repeating-linear-gradient(-30deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);color:#777;cursor:not-allowed}.button-group__input:focus~.button-group__label{box-shadow:0 0 5px #3b90c9}.button-group__sticker{position:absolute;left:0;transform:translateY(-50%);margin:0}.btn{display:inline-block;font-family:var(--button-font-family, "Museo-300", Arial, sans-serif);font-size:1.125em;line-height:1.3333;padding:.88889em .5em;min-width:var(--button-min-width,8em);border:none;background-color:var(--button-background-color,#99ca3c);color:var(--button-text-color,#fff);border-radius:3px;cursor:pointer}.btn.-small{font-size:1rem;line-height:.65rem;min-width:var(--button-min-width,5em)}.btn:not(:disabled):hover{background-color:var(--button-background-color-hover,#7ba42e)}.btn:disabled{opacity:.6}.form-item{display:block;margin-bottom:var(--spacing-x-large);font-weight:400}.form-item:last-child{margin-bottom:0}.form-item__label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.form-item__note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.form-item__field{display:block;width:100%;padding:.5em;font-size:1rem;line-height:1.25rem;border:1px solid #d3d3d3;background-repeat:no-repeat;background-position:calc(100% - .5em) 50%;border-radius:3px;max-width:320px}.form-item__field.-uppercase{text-transform:uppercase}.form-item__field:focus{outline:0;box-shadow:0 0 2px 1px rgba(0,153,204,.39),0 0 4px 3px rgba(0,153,204,.18),0 0 8px 4px rgba(0,153,204,.1)}.form-item__field.-has-validation{padding-right:2em}.form-item__field.-is-valid{border-color:#99ca3c;background-image:url("data:image/svg+xml,%3Csvg width='19px' height='13px' viewBox='0 0 19 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon fill='%2399CA3C' points='6.70967742 13 0 6.29032258 2.09677419 4.19354839 6.70967742 8.80645161 16.3548387 0 18.4516129 2.09677419'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-is-invalid{border-color:#e3097c;background-image:url("data:image/svg+xml,%3Csvg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon id='Path' fill='%23E3097C' points='12.759145 0.0312229203 14.8804653 2.15254326 9.57716447 7.45584412 14.8804653 12.759145 12.759145 14.8804653 7.45584412 9.57716447 2.15254326 14.8804653 0.0312229203 12.759145 5.33452378 7.45584412 0.0312229203 2.15254326 2.15254326 0.0312229203 7.45584412 5.33452378'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-read-only,.form-item__field:disabled,.form-item__field[disabled]{border-width:0 0 1px;padding-left:0;color:#595959}textarea.form-item__field{min-height:8em}.form-item__multi-input{max-width:320px;display:flex;align-items:center}.form-item__multi-input.-is-as-set{max-width:460px}.form-item__multi-input-separator{flex:0 0 auto;padding:0 .5em}.form-item__multi-input-item{flex:1 0 5em}.form-item__multi-input-item.-fixed-auto-width{flex:0 0 auto;width:auto}.form-radio-line{max-width:320px}.ccards{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.ccards:empty{display:none}.ccard{position:relative;border:1px solid #dedede}.ccard p{margin:0}.ccard>a{text-decoration:none}.ccard.-loading{border:1px dashed #dedede;text-align:center}.ccards.-grid .ccard{flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.ccards{display:grid}.ccards.-grid{grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.ccard,.ccards.-grid .ccard{margin:0}}.ccard__tags{position:absolute;top:0;left:0;display:flex;flex-direction:row-reverse;justify-content:flex-start;width:100%;transform:translateY(-50%)}.ccard__header{display:flex;padding:var(--spacing-small);background-color:#09c;color:#fff}.ccard__header-heading{flex:1 0 auto;color:#fff}.ccard__header-info{flex:0 0 4em;text-align:right;max-height:24px;overflow:hidden}.ccard__content-padding{padding:var(--spacing-medium)}.ccard__heading{margin:0;font-size:1em}.ccard__main-action{display:block;margin:0;font-family:Museo-300}.ccard__main-action-label{display:block;padding:var(--spacing-small);text-align:center;cursor:pointer;background-color:#99ca3c;color:#fff}.ccard__main-action-label.-neutral{background-color:#d8d8d8;color:#333}.ccard__main-action-input:checked+.ccard__main-action-label{background-color:#09c;color:#fff}.ccard__main-action-input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.ccard__add{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background-color:#f5f5f5;color:#333;cursor:pointer}.ccard__add:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.ccard__add-icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.ccard__add-label{flex:0 0 auto;text-decoration:none}.ccard__provider-logo{display:block;max-width:92px;height:auto;margin:0 auto var(--spacing-small)}.tiles-list{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.tiles-list:empty{display:none}.tiles-list__item{position:relative;flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.tiles-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.tiles-list__item{margin:0}}.tile-add-service{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:var(--spacing-medium);background-color:#f5f5f5;border:1px solid #dedede;color:#333;text-decoration:none}.tile-add-service:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.tile-add-service__icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.tile-add-service__label{flex:0 0 auto;text-decoration:none}.tile-loading{display:flex;flex-direction:column;justify-content:center;padding:var(--spacing-medium);border:1px dashed #dedede;text-align:center}.switch-bar{display:flex;justify-content:space-between;align-items:center;border:1px solid #d3d3d3;border-width:1px 0}.switch-bar__label{padding:.5em 0;margin-right:.5em}.switch{position:relative}.switch__input{position:absolute;opacity:0;z-index:-1}.switch__icon{display:block;min-width:2.5rem;width:var(--switch-icon-width,3em);min-height:2.5rem;cursor:pointer;background-color:transparent}.switch__icon:after,.switch__icon:before{content:"";position:absolute;display:block}.switch__icon:before{top:50%;transform:translateY(-50%);width:100%;height:var(--switch-icon-bg-height,1.5rem);border-radius:calc(var(--switch-icon-bg-height,1.5rem)/ 2);box-shadow:inset 0 0 0 2px #a4b9c1,inset 0 4px 3px 0 rgba(0,0,0,.22);background-color:#e83a96;will-change:background-color;transition:background-color 150ms ease-in-out}.switch__icon:after{top:calc(50% - var(--switch-icon-toggle-diameter,1.5rem)/ 2);width:var(--switch-icon-toggle-diameter,1.5rem);height:var(--switch-icon-toggle-diameter,1.5rem);border-radius:50%;background-image:linear-gradient(-180deg,#e2e2e2 0,#91c6d7 100%);box-shadow:inset 0 0 0 2px #a4b9c1,0 2px 2px 0 rgba(0,30,40,.34);transform:translateX(0);will-change:transform;transition:transform 150ms ease-in-out}.switch__input:checked+.switch__icon:before{background-color:#99ca3c}.switch__input:checked+.switch__icon:after{transform:translateX(var(--switch-icon-width,3em)) translateX(calc(var(--switch-icon-toggle-diameter,1.5rem) * -1))}.info-bar{display:flex;align-items:flex-start;flex-wrap:wrap;padding:1em 0;border:1px solid #dedede;border-width:1px 0;font-family:Museo-300;line-height:1.5}.info-bar.-align-center{align-items:center}.info-bar.-compact{padding:.5em 0;font-family:Helvetica,Arial,sans-serif}.info-bar+.info-bar{border-width:0 0 1px 0}.info-bar__label{flex:0 0 17em;margin:0}.info-bar.-compact>.info-bar__label{flex-basis:10em}.info-bar__info{flex:1 1 17em;margin:0;word-break:break-all}.flex-grid{display:flex;flex-wrap:wrap;background-color:#d3d3d3}.flex-grid__section{display:flex;flex-wrap:wrap;flex:0 0 100%}.flex-grid__cell{flex:9999 0 14em;padding:.75rem;outline:1px solid #d3d3d3;background-color:#fff}.flex-grid__cell.-medium{flex:2 0 14em}.flex-grid__cell.-small{flex:1 0 7em}.flex-grid__label{margin:0;font-size:.75em;text-transform:uppercase;line-height:1.333}.flex-grid__label.-secondary{font-style:italic;text-transform:none}.flex-grid__info{margin:0 0 .5rem;font-size:1.125em;line-height:1.333}.flex-grid__info:last-child{margin:0}.logo-pills{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.logo-pills__item{flex:1 0 10.5em;margin:0 1em 1em 0}@supports (grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr))){.logo-pills{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr));grid-gap:1em}.logo-pills__item{position:relative;margin:0}}.logo-pills__input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.logo-pills__frame{display:flex;flex-direction:column;align-items:center;padding:1em;border:1px solid #dedede}.logo-pills__frame:hover{border-color:#09c}.logo-pills__input:checked+.logo-pills__frame{border-color:#09c;background-color:#e5f4f9}.logo-pills__frame.-disabled,.logo-pills__input:disabled+.logo-pills__frame{opacity:.6}.logo-pills__frame.-disabled:hover,.logo-pills__input:disabled+.logo-pills__frame:hover{border-color:#dedede}.logo-pills__click-area{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;cursor:pointer;z-index:2}.logo-pills__frame.-disabled .logo-pills__click-area,.logo-pills__input:disabled+.logo-pills__frame .logo-pills__click-area{cursor:not-allowed}.logo-pills__label{display:block;margin:.25em 0 .5em}.logo-pills__img{max-width:92px;height:auto;margin:.25em 0 .5em}.logo-pills__availability{position:absolute;top:-.5em;left:0;z-index:2}.summary-list{padding:0 0 0 1em;margin:0;list-style-type:none}.summary-list__label{position:relative;font-size:.8125em}.summary-list__label:not(:first-child){margin-top:.61538em}.summary-list__label.-main:not(:first-child){margin-top:1.2307em}.summary-list__label.-main:before{content:"";position:absolute;top:50%;left:-1em;transform:translateY(-50%);display:block;width:.61538em;height:.61538em;background-color:#09c;border-radius:50%}.summary-list__description{margin:0;font-size:1em;line-height:1.5;word-break:break-word}.summary-list__description.-min-two-lines{min-height:3em}.summary-list-csp-logo{max-width:92px;height:auto;margin:0;display:block;float:right}vaadin-dialog-overlay{--spacing-tiny:0.25rem;--spacing-small:0.5rem;--spacing-medium:1rem;--spacing-large:1.5rem;--spacing-x-large:2rem;--spacing-xx-large:2.5rem;--subheading-color:#09c}.no-indent-section{--step-section-content-indentation:0}[slot=body]{margin-top:var(--spacing-small)}.navbar{background-color:#014482}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all;color:#fff}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.border-top{border-top:1px solid #e5e5e5}.border-bottom{border-bottom:1px solid #e5e5e5}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}button.accept-policy{font-size:1rem;line-height:inherit}html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%;white-space:nowrap;height:60px;line-height:60px}.museo-300{font-family:Museo-300}h1,h2,h3,h4{font-family:Museo-300;font-size:1.3em;font-weight:400}h1{font-size:2em;margin-bottom:.5em}h2{font-size:1.25rem}h4{font-size:1.1em}a.basic-link,a:not([href]):not([tabindex]).basic-link{font-size:14px;font-family:Arial,Helvetica,sans-serif;text-decoration:underline;color:#09c;cursor:pointer}select:disabled{background-color:#eee}.container{max-width:722px}.navbar-nav{list-style-type:none}.navbar-nav>li{margin:16px}.large-margin-top{margin-top:70px}.medium-margin-top{margin-top:45px}.small-margin-top{margin-top:20px}.align-right{text-align:right}.medium-padding{padding:20px}.u-block{display:block}.u-margin-none{margin:0}.u-margin-bottom-large{margin-bottom:2em}.u-padding-small{padding:.5rem}.u-padding-bottom-large{padding-bottom:2em}.u-small-text{font-size:.875rem}.u-mini-text{font-size:.75rem}.green-btn{display:inline-block;background-color:#99ca3c;color:#fff;font-family:Museo-300;padding:15px 50px;border:0;border-radius:4px;text-decoration:none;font-size:1rem}.green-btn:hover{color:#fff;text-decoration:none}.green-btn:disabled{background-color:#ccc}.default-label{font-family:Arial,Helvetica,sans-serif}.standard-text{font-size:14px;font-family:Arial,Helvetica,sans-serif}.legal-text{font-size:13px;font-family:Arial,Helvetica,sans-serif}.pricing-section{background-color:#eee;padding:10px 0}.service-container{display:inline-block;border:solid 1px #ddd;margin:10px;padding:10px}.service-container div{background-color:#99ca3c;color:#fff;font-family:Museo-300;text-align:center;cursor:pointer;padding:10px;margin-top:5px}.bold-text{font-weight:700}.radio-pills{list-style-type:none;padding-left:0}.radio-pills__item{display:inline-block;position:relative;margin:.25em .25em .25em 0}.radio-pills.-stacked .radio-pills__item{display:block}.radio-pills.-stacked .radio-pills__item:not(:last-child){margin-bottom:.5em}.radio-pills__input{position:absolute;width:1px;height:1px;overflow:hidden;z-index:-1;opacity:0}.radio-pills__label{background-color:#f7f8f8;border:1px solid #b3d0e9;border-radius:1.25em;color:#666;line-height:1;padding:.75em 1.5em;text-align:center;display:block;cursor:pointer}.radio-pills.-stacked .radio-pills__label{display:flex;justify-content:space-between;align-items:center;text-align:left;padding-left:2.25em}.radio-pills.-stacked .radio-pills__label:before{content:"";position:absolute;left:1em;width:1em;height:1em;background-color:#fff;border-radius:50%;border:1px solid #09c}.radio-pills__label:hover{background:#e6f2f8}.radio-pills__input:disabled:not(:checked)+.radio-pills__label,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label{cursor:not-allowed;background-image:repeating-linear-gradient(45deg,#e5e5e5,#e5e5e5 1px,transparent 1px,transparent 4px);border-color:#d5d5d5}.radio-pills__input:disabled:not(:checked)+.radio-pills__label:hover,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label:hover{background-color:#f7f8f8}.radio-pills.-stacked .radio-pills__input:disabled:not(:checked)+.radio-pills__label:before,.radio-pills.-stacked .radio-pills__input[disabled]:not(:checked)+.radio-pills__label:before{border-color:#b5b5b5}.radio-pills__input:checked+.radio-pills__label{background-color:#eaf4d8;border-color:#99ca3c;color:#5c7a24}.radio-pills.-stacked .radio-pills__input:checked+.radio-pills__label:before{background-image:radial-gradient(circle,#09c 50%,transparent 55%,transparent);background-repeat:no-repeat}.radio-pills__info{flex:0 1 40%;font-style:italic;font-weight:700;color:#000}.radio-card__input{position:absolute;opacity:0;z-index:-10}.radio-card__main-action{overflow:hidden}.radio-card__dual-label{position:relative;transition:transform 150ms ease-in-out}.radio-card__input:checked+.radio-card__dual-label{transform:translateY(-100%)}.radio-card__input:disabled+.radio-card__dual-label *{background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);cursor:not-allowed}.radio-card__default-label{display:block;padding:.5em;text-align:center;background-color:#dedede;color:#000}.radio-card__alternate-label{position:absolute;top:100%;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background-color:#09c;color:#fff}.gauge{border:1px solid #dedede}.gauge>*{height:.5em;background-color:#dedede}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem}.alternate-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem;display:block;font-style:italic}.status-timeline{list-style-type:none;margin:0 0 2em;padding:0}.status-timeline__item{position:relative;padding:0 0 3em;padding-left:4rem;background:repeating-linear-gradient(#e0e0e0,#e0e0e0 .75rem,transparent .75rem,transparent 1rem) 1.9rem 0 100% repeat-y}.status-timeline__item.-success{background:linear-gradient(#09c,#09c) 1.9rem 0 100% repeat-y}.status-timeline__item:last-child{background-image:none;padding-bottom:0}.status-timeline__icon{position:absolute;top:0;left:1.25rem;width:1.5rem;height:1.5rem;background-color:#e0e0e0;border-radius:1.5rem;background-repeat:no-repeat;background-position:50% 50%}.status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='140px' height='36px' viewBox='0 0 140 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M18,36 C8.0588745,36 0,27.9411255 0,18 C0,8.0588745 8.0588745,0 18,0 C27.9411255,0 36,8.0588745 36,18 C36,27.9411255 27.9411255,36 18,36 Z M70,36 C60.0588745,36 52,27.9411255 52,18 C52,8.0588745 60.0588745,0 70,0 C79.9411255,0 88,8.0588745 88,18 C88,27.9411255 79.9411255,36 70,36 Z M122,36 C112.058875,36 104,27.9411255 104,18 C104,8.0588745 112.058875,0 122,0 C131.941125,0 140,8.0588745 140,18 C140,27.9411255 131.941125,36 122,36 Z' id='Combined-Shape' fill='%23ffffff'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-success .status-timeline__icon{background-color:#09c}.status-timeline__item.-success .status-timeline__icon:empty{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E %3Cpolygon fill='%23ffffff' fill-rule='evenodd' points='19.227 8 13.174 14.053 10.799 11.654 10 12.453 13.174 15.627 19.999 8.8' transform='translate(-10 -8)'/%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-pending .status-timeline__icon{background-color:#8c8c8c}.status-timeline__item.-pending .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='141px' height='156px' viewBox='0 0 141 156' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='two-circling-arrows' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M35.735,121.521 C22.965,111.248 14.793,95.496 14.793,77.83 C14.793,51.716 32.675,29.838 56.844,23.6 L56.844,9.154 C24.854,15.646 0.776,43.927 0.776,77.83 C0.776,98.781 9.975,117.568 24.543,130.408 C35.819,140.911 42.827,126.894 35.735,121.521 Z M116.589,24.746 C109.409,18.261 98.896,28.774 105.788,33.982 C118.676,44.252 126.931,60.079 126.931,77.83 C126.931,103.948 109.046,125.83 84.879,132.064 L84.879,146.513 C116.869,140.014 140.947,111.737 140.947,77.829 C140.947,56.602 131.502,37.596 116.589,24.746 Z M63.037,35.707 L85.85,22.046 C89.169,20.058 89.176,16.82 85.868,14.818 L62.844,0.883 C59.532,-1.116 56.859,0.393 56.8749285,4.264 L56.999,32.299 C57.009,36.168 59.714,37.695 63.037,35.707 Z M78.883,120.029 L55.856,133.964 C52.545,135.966 52.552,139.203 55.875,141.192 L78.686,154.854 C82.005,156.838 84.716,155.316 84.733,151.442 L84.8530402,123.408 C84.865,119.54 82.188,118.03 78.883,120.029 Z' id='Shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-error .status-timeline__icon{background-color:#d00232}.status-timeline__item.-error .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='22px' height='22px' viewBox='0 0 22 22' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='cancel' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M14.1,11.3 C13.9,11.1 13.9,10.8 14.1,10.6 L21.6,3.1 C21.8,2.9 21.9,2.6 21.9,2.4 C21.9,2.2 21.8,1.9 21.6,1.7 L20.2,0.3 C20,0.1 19.7,0 19.5,0 C19.2,0 19,0.1 18.8,0.3 L11.3,7.8 C11.1,8 10.8,8 10.6,7.8 L3.1,0.3 C2.9,0.1 2.6,0 2.4,0 C2.2,0 1.9,0.1 1.7,0.3 L0.3,1.7 C0.1,1.9 0,2.2 0,2.4 C0,2.6 0.1,2.9 0.3,3.1 L7.8,10.6 C8,10.8 8,11.1 7.8,11.3 L0.3,18.8 C0.1,19 0,19.3 0,19.5 C0,19.7 0.1,20 0.3,20.2 L1.7,21.6 C1.9,21.8 2.2,21.9 2.4,21.9 C2.6,21.9 2.9,21.8 3.1,21.6 L10.6,14.1 C10.8,13.9 11.1,13.9 11.3,14.1 L18.8,21.6 C19,21.8 19.3,21.9 19.5,21.9 C19.7,21.9 20,21.8 20.2,21.6 L21.6,20.2 C21.8,20 21.9,19.7 21.9,19.5 C21.9,19.3 21.8,19 21.6,18.8 L14.1,11.3 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.5rem .5rem}.status-timeline__item.-warning .status-timeline__icon{background-color:#f1941f}.status-timeline__item.-warning .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='48px' height='228px' viewBox='0 0 48 228' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M24.154,0.005 C36.216,0.005 46.421,6.81 46.421,18.871 C46.421,55.674 42.092,108.558 42.092,145.36 C42.092,154.947 31.577,158.967 24.155,158.967 C14.259,158.967 5.908,154.947 5.907,145.36 C5.907,108.557 1.578,55.673 1.578,18.871 C1.578,6.809 11.474,0.005 24.154,0.005 Z M24.465,180.306 C37.144,180.306 47.97,191.13 47.97,204.12 C47.97,216.8 37.145,227.934 24.465,227.934 C10.857,227.934 0.651,216.8 0.651,204.12 C0.651,191.13 10.858,180.306 24.465,180.306 Z' id='Combined-Shape' fill='%23ffffff' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__icon.-anim-rotate{-webkit-animation:icon-rotation 1.2s infinite;animation:icon-rotation 1.2s infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.status-timeline__heading{margin:0 0 .4em;font-size:1.5em;font-weight:400;font-family:Museo-300;line-height:1.5rem;color:#ccc}.status-timeline__item.-success .status-timeline__heading{color:#09c}.status-timeline__item.-pending .status-timeline__heading{color:#8c8c8c}.status-timeline__item.-error .status-timeline__heading{color:#d00232}.status-timeline__item.-warning .status-timeline__heading{color:#f1941f}.status-timeline__content>:last-child{margin-bottom:0}@keyframes icon-rotation{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}button{cursor:pointer}.u-app-width{width:100%;max-width:920px;margin-left:auto;margin-right:auto;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.u-text-right{text-align:right}.u-text-center{text-align:center}.u-float-right{float:right}.u-inline-block{display:inline-block;vertical-align:middle}.u-inline-block.-align-bottom{vertical-align:bottom}.u-inline-block.-align-top{vertical-align:top}.u-margin-top-none{margin-top:0}.u-margin-top-small{margin-top:var(--spacing-small)}.u-margin-top-medium{margin-top:var(--spacing-medium)}.u-margin-bottom-small{margin-bottom:var(--spacing-small)}.u-margin-bottom-medium{margin-bottom:var(--spacing-medium)}.u-margin-bottom-large{margin-bottom:var(--spacing-large)}.u-margin-bottom-x-large,.u-mb-2{margin-bottom:var(--spacing-x-large)}.u-margin-top-xx-large{margin-top:var(--spacing-xx-large)}.u-margin-bottom-xx-large{margin-bottom:var(--spacing-xx-large)}.u-margin-right-medium{margin-right:var(--spacing-medium)}.u-margin-left-medium{margin-left:var(--spacing-medium)}.u-margin-left-x-large{margin-left:var(--spacing-x-large)}:host{display:block;box-sizing:border-box}:host *{box-sizing:border-box}`;class bo extends z{static get styles(){return[wo]}static get properties(){return{updateAvailable:{type:Boolean},updating:{type:Boolean},workboxInstance:{type:Object}}}firstUpdated(){this.init()}init(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{this.register()})}register(){this.workboxInstance=new fo("/service-worker-root.js"),this.workboxInstance.addEventListener("waiting",()=>{this.updateAvailable=!0}),this.workboxInstance.addEventListener("installed",e=>{e.isUpdate&&(this.updateAvailable=!0),this.updateAvailable&&this.updateApplication()}),this.workboxInstance.register()}updateApplication(){this.updating=!0,this.workboxInstance.addEventListener("controlling",()=>{window.location.reload()}),this.workboxInstance.messageSW({type:"SKIP_WAITING"})}render(){return l``}}window.customElements.define("register-service-worker",bo);const vo=(i,e)=>{if(!e)throw new Error("Account number is not available in the token.");const t=xo(i,e),o=fe.filter(n=>t.includes(n.label));o.length>0&&(o.find(n=>n.label===re)||o.unshift(fe.find(n=>n.label===re)),!(o.length===1&&o[0].label===re)&&!o.find(n=>n.label===we)&&o.push(fe.find(n=>n.label===we))),o.length===1&&o[0].label===re&&o.pop();const{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}=et(i,e);return o.map(n=>{let s=`${n.href}?selected_account_number=${e}`;return n.label===ge&&(s=`${n.href}?selected_account_number=${a}`),n.label===ae&&(s=tt(n,r)),n.label===we&&(s=n.href),{...n,href:s}})},et=(i,e)=>{const t=it(i,e),o=ot(t,e);let a,r;return o&&o.portal===ge?a=o.accountNumber:a=Ae(t,ge)||e,o&&o.portal===ae?r=o.accountNumber:r=Ae(t,ae)||e,{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}},tt=(i,e)=>{var t;const o=new URL(i.href);o.searchParams.set("selected_account_number",e);const a=d=>d.toLowerCase().replace(/\/+$/,""),r=a(window.location.pathname),{pathAndQuerystring:n}=window.registeredApps["ui-gom"],s=d=>{const f=a(d.path);return r===f||r.startsWith(f+"/")},c=n.find(s),h=(t=c==null?void 0:c.mppProcessQueryString)!=null?t:null;return o.searchParams.delete("process"),h&&o.searchParams.set("process",h),o.toString()},it=(i,e)=>{if(!e)return null;function t(a){for(const r of a){if(r.accountNumber.toLowerCase()===e.toLowerCase())return r;if(r.subAccounts&&r.subAccounts.length>0){const n=t(r.subAccounts);if(n)return{...r,subAccounts:[n]}}}return null}return i.find(a=>a.accountNumber.toLowerCase()===e.toLowerCase())||t(i)},Ae=(i,e)=>{if(!i)return null;if(i.portal===e)return i.accountNumber;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=Ae(t,e);if(o)return o}return null},xo=(i,e)=>{const t=it(i,e);if(!t)return[];const o=new Set;function a(r){var n;o.add(r.portal),(n=r.subAccounts)!=null&&n.length&&r.subAccounts.forEach(s=>{a(s)})}return a(t),Array.from(o)},ot=(i,e)=>{if(!i)return null;if(i.accountNumber.toLowerCase()===e.toLowerCase())return i;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=ot(t,e);if(o)return o}return null};var yo=Object.defineProperty,Co=(i,e,t)=>e in i?yo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,_o=(i,e,t)=>Co(i,e+"",t);const at=class rt{constructor(){if(this.registered=!1,this.appInsightsReady=!1,this.queue=[],window[be.appInsights])this.appInsightsReady=!0;else{const e=()=>{this.appInsightsReady=!0,this.processQueue(),window.removeEventListener("appInsightsInitialized",e)};window.addEventListener("appInsightsInitialized",e)}}isBatched(){return!1}getIgnoreUrls(){return[]}send(e){Array.isArray(e)?e.forEach(t=>this.buildTelemetry(t)):this.buildTelemetry(e)}processQueue(){for(;this.queue.length>0;){const e=this.queue.shift();this.buildTelemetry(e)}}buildTelemetry(e){var t,o,a,r,n,s,c,h,d;if(e.type!=="measurement")return;if(!this.appInsightsReady||!window[be.appInsights]){this.queue.push(e);return}const{payload:f,meta:x}=e,$={application:pe,sessionId:(t=x.session)==null?void 0:t.id,pageUrl:(o=x.page)==null?void 0:o.url,browserName:(a=x.browser)==null?void 0:a.name,browserVersion:(r=x.browser)==null?void 0:r.version,browserOs:(n=x.browser)==null?void 0:n.os,measurementId:(s=f.context)==null?void 0:s.id,rating:(c=f.context)==null?void 0:c.rating,navigationType:(h=f.context)==null?void 0:h.navigation_type,navigationEntryId:(d=f.context)==null?void 0:d.navigation_entry_id};Object.keys($).forEach(T=>{$[T]===void 0&&delete $[T]}),Object.entries(e.payload.values).forEach(([T,nt])=>{if(rt.VALID_METRICS.includes(T)){const st=`global-portal-${T}`;window[be.appInsights].trackMetric({name:st,average:nt},$)}})}register(){if(this.registered)return;const e=()=>window.faro?(window.faro.transports.add(this),this.registered=!0,!0):!1;if(e())return;let t=0;const o=5,a=setInterval(()=>{t+=1,(e()||t>=o)&&(clearInterval(a),t>=o&&console.warn("Faro SDK not detected after maximum attempts"))},400)}};_o(at,"VALID_METRICS",["cls","lcp","fcp","time_to_first_byte"]);let ko=at;var Ao=Object.defineProperty,Eo=(i,e,t)=>e in i?Ao(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e,t)=>Eo(i,typeof e!="symbol"?e+"":e,t);window.registeredApps["ui-user-management"].enabled&&import("http://localhost:8082/ui-user-management.js"),window.registeredApps["ui-service-management"].enabled&&import("http://localhost:8083/ui-service-management.js"),window.registeredApps["ui-gom"].enabled&&import("http://localhost:8090/ui-mfe-gom.js"),(window.registeredApps["ui-inventory"].enabled||window.registeredApps["ui-sites"].enabled)&&import("http://localhost:8089/ui-inventory.js"),window.registeredApps["ui-launchpad"].enabled&&import("http://localhost:8087/ui-launchpad.js"),window.registeredApps["ui-dcim-charts"].enabled&&import("http://localhost:8084/ui-mfe-dcim.js"),window.registeredApps["ui-dcim-reports"].enabled&&import("http://localhost:8085/ui-mfe-reports.js"),window.registeredApps["ui-my-account"].enabled&&import("http://localhost:8088/ui-my-account.js"),window.registeredApps["ui-esg"].enabled&&import("http://localhost:8091/ui-mfe-esg.js"),window.getAppVersions=Ii;class No extends M{constructor(){super(),A(this,"checkActivityInterval",1e4),A(this,"inactiveDuration",9e5),A(this,"accounts",[]),A(this,"timeoutController",new ct(this,()=>(this.detectLoggedOut(),g.compareLastActive(this.inactiveDuration)),()=>{g.showAutoLogout||(g.showAutoLogout=+new Date)},g.hydrateStore,this.checkActivityInterval)),A(this,"_clearSessionKeys",()=>{sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount")}),A(this,"_initQualtricsDataLayer",()=>{window._setQualtricsDataLayer=yt,window.addEventListener("setQualtricsDataLayer",this._pushQualtricsData)}),A(this,"_pushQualtricsData",e=>{window.dataLayer=window.dataLayer||[];const{dataLayer:t}=window,o=t.length>0?t[t.length-1]:null,a={event:"qualtrics",...e.detail};(o==null?void 0:o.event)==="qualtrics"&&Object.keys(a).every(r=>o[r]===a[r])||window.dataLayer.push(a)}),A(this,"anAppIsActive",()=>this.isDashboardActive||!!Hi(window.location.pathname)),A(this,"renderApps",()=>l` ${this.isDashboardActive&&this.isMfeEnabled("ui-launchpad")?l` <ui-launchpad></ui-launchpad> `:v} ${this.isMfeEnabled("ui-my-account")?l` <div class="${this.isAccActive?"":"zero-width-height"}"> <ui-my-account baseUrl="/my-account"></ui-my-account> </div> `:v} ${this.isMfeEnabled("ui-service-management")?l` <div class="${this.isSMActive?"":"zero-width-height"}"> <ui-service-management baseUrl="/service-management"></ui-service-management> </div> `:v} ${this.isMfeEnabled("ui-gom")?l` <div class="${this.isGOMActive?"":"zero-width-height"}"> <ui-mfe-gom></ui-mfe-gom> </div> `:v} ${this.isMfeEnabled("ui-user-management")?l` <div class="${this.isUMActive?"":"zero-width-height"}"> <ui-user-management data-theme="ix-theme" baseUrl="/user-management"></ui-user-management> </div> `:v} ${this.isMfeEnabled("ui-sites")?l` <div class="${this.isSITEActive?"":"zero-width-height"}"> <ui-inventory data-theme="ix-theme" baseUrl="${window.registeredApps["ui-sites"].path}"></ui-inventory> </div> `:v} ${this.isMfeEnabled("ui-knowledge-base")?l` ${this.isKBActive?l` <iframe title="Knowledge Base" class="w-full h-full" src="${this.knowledgeBaseIframeURL}"></iframe> `:v} `:v} ${this.isMfeEnabled("ui-dcim-charts")?l` <div class="${this.isDCIMChartsActive?"":"zero-width-height"}"> <ui-mfe-charts class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-charts"].path}"></ui-mfe-charts> </div> `:v} ${this.isMfeEnabled("ui-dcim-reports")?l` <div class="${this.isDCIMReportsActive?"":"zero-width-height"}"> <ui-mfe-reports class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-reports"].path}"></ui-mfe-reports> </div> `:v} ${this.isMfeEnabled("ui-esg")?l` <div class="${this.isESGActive?"":"zero-width-height"}"> <ui-mfe-esg></ui-mfe-esg> </div> `:v} `),A(this,"_handleAutoLogoutClose",()=>{this.detectLoggedOut(!0),g.showAutoLogout=0,this.timeoutController.setInterval()}),A(this,"_setAllCookies",(e,t)=>{const o=Object.keys(ne).map(a=>({cookie_name:ne[a],cookie_version:ve,accepted:e,user_action:t}));this.isCookieExpired=!1,this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.revokedConsent&&window.location.reload()}),A(this,"_processTargetingCookieChange",e=>{}),A(this,"_processPerformanceCookieChange",e=>{var t;const o=(t=e.find(a=>a.cookie_name===ne.performance))==null?void 0:t.accepted;this._getCookieConsent("performance")!==o&&(window.dataLayer&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o}),o||(Ri(),this.revokedConsent=!0))}),A(this,"_checkForCookieExpiry",()=>{if(!g.cookiesAccepted)return;const e=Date.now();g.cookiesAccepted.forEach(t=>{(new Date(t.expires).getTime()<e||t.cookie_version!==ve)&&(this.isCookieExpired=!0)})}),this.appReady=!1,this.compact=!0,this.isAppVersionsVisible=!1,this.isCustomiseCookiesVisible=!1,this.isCookieExpired=!1,this.revokedConsent=!1,this.processingConsent=!1,localStorage.setItem("compact",!0),window._setQualtricsDataLayer=()=>{},sessionStorage.setItem(me.SessionStorage.HasOutstandingChanges,"false")}detectLoggedOut(e){if(!Ft()){const t=window.location.pathname;if(t==="/session-expired"||t==="/authenticate")return!1;sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount"),window.location.href=e?"/logout?isIdle=true":"/logout"}return!0}connectedCallback(){super.connectedCallback(),this.pageWidthElem=this.querySelector("#page-width"),this.intraPortalNavbarItems=[],window.addEventListener("keydown",g.setLastActive),window.addEventListener("click",g.setLastActive),window.addEventListener("scroll",g.setLastActive),window.addEventListener("touchstart",g.setLastActive),Vi(),window.addEventListener("accountsloaded",this.filterIntraNavBarItems.bind(this)),window.addEventListener("beforeunload",this._clearSessionKeys)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",g.setLastActive),window.removeEventListener("click",g.setLastActive),window.removeEventListener("scroll",g.setLastActive),window.removeEventListener("touchstart",g.setLastActive),window.removeEventListener("beforeunload",this._clearSessionKeys),window.removeEventListener("accountsloaded",this.filterIntraNavBarItems),window.removeEventListener("setQualtricsDataLayer",this._pushQualtricsData)}checkAccountExists(e,t){var o;let a=null;for(const r of t){if(r.accountNumber.toLowerCase()===e.toLowerCase()||((o=r.parentAccountNumber)==null?void 0:o.toLowerCase())===e.toLowerCase()){a=r;break}if(r.subAccounts&&r.subAccounts.length>0&&(a=this.checkAccountExists(e,r.subAccounts),a))break}return a}async detectQueryParamsAndSwitchAccount(){const e=new URLSearchParams(window.location.search),t=e.get("selected_account_number");if(t!=null){const o=await V({page_size:1,account_number:t}),a=this.checkAccountExists(t,o.items);e.delete("selected_account_number");let r=window.location.origin+window.location.pathname;const n=e.toString();if(n&&(r+=`?${n}`),window.history.replaceState({},"",r),a)if(a.parentAccountNumber){const s=this.checkAccountExists(a.parentAccountNumber,o.items);s&&await de(s.accountNumber)}else await de(a.accountNumber)}}static get properties(){return{appTitle:{type:String},currentPath:{type:String},compact:{type:Boolean,reflect:!0},isAppVersionsVisible:{type:Boolean},isCustomiseCookiesVisible:{type:Boolean},isCookieExpired:{type:Boolean},intraPortalNavbarItems:{type:Array}}}static get styles(){return[Ue,Ct,k,ji]}update(e){this.appReady=this.anAppIsActive(),super.update(e)}async firstUpdated(){if(!Zt())return;await g.hydrateStore(),g.setLastActive(),g.showAutoLogout=0,await g.hydrateStore(),this.timeoutController.setInterval(),window.addEventListener(I.VaadinRouterLocationChanged,()=>{var a,r;if((a=this.intraPortalNavbarItems)!=null&&a.length){const n=K(),{marketPlacePortalAccountNumber:s}=et(this.accounts,(r=n==null?void 0:n.profile)==null?void 0:r.account_number);this.intraPortalNavbarItems=this.intraPortalNavbarItems.map(c=>c.label===ae?{...c,href:tt(c,s)}:c)}this.requestUpdate()}),await lt.hydrateStore();const e=await Di();this.saveDateTimeFormatToLocalStorage(e),this.detectQueryParamsAndSwitchAccount(),this._checkForCookieExpiry();const t=this._getCookieConsent("targeting"),o=this._getCookieConsent("performance");if(o||Pi(),window.dataLayer){t&&this._getAccountDetails();const a={};(t||o)&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o,...a})}new ko().register()}_getAccountDetails(){var e,t;const o=(e=JSON.parse(localStorage.getItem(Me)||{}))==null?void 0:e.profile,{account_number:a,hashed_identifier:r}=o!=null?o:{},n=(t=JSON.parse(localStorage.getItem(Bt)||"{}"))==null?void 0:t.name;return{account_number:a,hashed_identifier:r,user_name:n}}_getCookieConsent(e){const t=g.cookiesAccepted.find(o=>o.cookie_name===ne[e]);return t==null?void 0:t.accepted}saveDateTimeFormatToLocalStorage(e){localStorage.setItem(jt,JSON.stringify({preferredDateFormat:e.preferredDateFormat,preferredTimeFormat:e.preferredTimeFormat,preferredTimezone:e.preferredTimezone})),this.dispatchEvent(new CustomEvent("dateFormatChanged",{bubbles:!0,composed:!0}))}async filterIntraNavBarItems(){var e;if(this.accounts.length>0)return!1;const t=await V();this.accounts=t.items;const o=K(),a=(e=o==null?void 0:o.profile)==null?void 0:e.account_number;this.intraPortalNavbarItems=vo(this.accounts,a)}get isDashboardActive(){return window.location.pathname==="/"}get isAccActive(){return window.location.pathname.startsWith(window.registeredApps["ui-my-account"].path)}get isSMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-service-management"].path)}get isGOMActive(){return(window.registeredApps["ui-gom"].path||[]).some(e=>window.location.pathname.startsWith(e))}get isESGActive(){return window.location.pathname.startsWith(window.registeredApps["ui-esg"].path)}get isUMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-user-management"].path)}get isKBActive(){return window.location.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)}get isUIActive(){return window.location.pathname.startsWith(window.registeredApps["ui-inventory"].path)}get isSITEActive(){return window.location.pathname.startsWith(window.registeredApps["ui-sites"].path)}get isDCIMChartsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)}get isDCIMReportsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)}get isCPActive(){return window.location.pathname.startsWith(window.registeredApps[Ut].path)}get knowledgeBaseIframeURL(){const e=window.location.pathname.replace(window.registeredApps["ui-knowledge-base"].path,"");return`${qt}${e}`}get intraportalNavItems(){return this.intraPortalNavbarItems}isMfeEnabled(e){var t;return(t=window.registeredApps[e])==null?void 0:t.enabled}waitForElement(){return new Promise(e=>{new MutationObserver((t,o)=>{const a=this.shadowRoot.querySelector("app-shell-header").shadowRoot.querySelector("account-selection");a&&(o.disconnect(),e(a))}).observe(document.body,{childList:!0,subtree:!0})})}toggleCompact(e){const{isCompact:t}=e.detail;if(t!==void 0){t!==this.compact&&(this.compact=t,localStorage.setItem("compact",`${this.compact}`));return}this.compact=!this.compact,localStorage.setItem("compact",`${this.compact}`)}render(){return this.appReady?this.isCPActive?l`<ix-cookie-policy></ix-cookie-policy>`:l` <div id="page-width"></div> ${v} <div class="fixed inset-0 bg-black opacity-50 z-20 ${this.compact?"hidden":"block"} lg:hidden" @click="${this.toggleCompact}" @keypress="${this.toggleCompact}"></div> <div class="animate-width grid-rows-[min-content] grid grid-cols-1 lg:grid-rows-none lg:grid-cols-[var(--left-bar-width)_minmax(0,auto)] min-h-[--body-height]"> <app-shell-navigation-bar .showAppVersions="${()=>this.isAppVersionsVisible=!0}" .showCustomiseCookies="${()=>this.isCustomiseCookiesVisible=!0}" @toggle-menu="${this.toggleCompact}" ?compact="${this.compact}" class="block drop-shadow-lg relative z-30"></app-shell-navigation-bar> <div class="flex flex-col grow h-full"> <div class="sticky top-0 z-[5]" style="top:var(--intraportal-nav-height,0)"> <app-shell-header></app-shell-header> <register-service-worker></register-service-worker> </div> <main class="grow lg:mx-0 pb-4 lg:px-4 lg:pl-12" id="mfeContainer"> ${this.renderApps()} </main> </div> </div> <ix-notifications style="--md-icon-button-icon-size:29px" data-theme="ix-theme" baseApiUrl="${Gt}" localStorageKey="${Me}"></ix-notifications> ${l` <ix-cookie-dialog ?open="${this.isCustomiseCookiesVisible}" selection="${g.cookiesAccepted.length===0?null:g.cookiesAccepted[0].user_action==="accept_all"?!0:g.cookiesAccepted[0].user_action==="customize"?JSON.stringify(g.cookiesAccepted.reduce((e,t)=>({...e,[t.cookie_name]:t.accepted}),{})):!1}" @closed="${()=>{this.isCustomiseCookiesVisible=!1}}" @accept-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!0,Z.accept),setTimeout(()=>{this.processingConsent=!1},10))}}" @reject-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!1,Z.reject),setTimeout(()=>{this.processingConsent=!1},10))}}" @accept-some="${e=>{if(this.processingConsent)return;this.processingConsent=!0;const t=e.detail,o=Object.keys(t).map(a=>({cookie_name:a,cookie_version:ve,accepted:t[a],user_action:Z.custom}));this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.isCookieExpired=!1,this.revokedConsent&&window.location.reload(),setTimeout(()=>{this.processingConsent=!1},10)}}" policy-url="${$e}"></ix-cookie-dialog> <ix-cookie-banner ?hidden="${!((g.cookiesAccepted.length===0||this.isCookieExpired)&&!this.isCustomiseCookiesVisible)}" @accept-all="${()=>{this._setAllCookies(!0,Z.accept)}}" @reject-all="${()=>{this._setAllCookies(!1,Z.reject)}}" @no-sell="${()=>{this._setAllCookies(!1,Z.no)}}" @customise-cookies="${()=>{this.isCustomiseCookiesVisible=!0}}" policy-url="${$e}"></ix-cookie-banner> `} <ix-toasters></ix-toasters> <ix-tooltip></ix-tooltip> <ix-app-versions @closed="${()=>this.isAppVersionsVisible=!1}" ?isVisible="${this.isAppVersionsVisible}" .versionsRequest="${Ze}"></ix-app-versions> <ix-auto-logout-dialog .externalCheck="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.lastActive===-1&&(window.location.href="/logout")}}" .timeoutAction="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.showAutoLogout!==0&&(window.location.href="/logout?isIdle=true")}}" opened-at="${g.showAutoLogout}" @closed="${this._handleAutoLogoutClose}" ?open="${g.showAutoLogout>0}"></ix-auto-logout-dialog> `:l``}}window.customElements.define("global-portal-app",No);
1492
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(i,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},Ce(i,e)}function po(i){var e=(function(t,o){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,o);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)})(i,"string");return typeof e=="symbol"?e:e+""}try{self["workbox:core:7.3.0"]&&_()}catch(i){}var _e=function(){var i=this;this.promise=new Promise(function(e,t){i.resolve=e,i.reject=t})};function ke(i,e){var t=location.href;return new URL(i,t).href===new URL(e,t).href}var te=function(i,e){this.type=i,Object.assign(this,e)};function D(i,e,t){return t?e?e(i):i:(i&&i.then||(i=Promise.resolve(i)),e?i.then(e):i)}function mo(){}var go={type:"SKIP_WAITING"};function Xe(i,e){return i&&i.then?i.then(mo):Promise.resolve()}var fo=(function(i){function e(r,n){var s,c;return n===void 0&&(n={}),(s=i.call(this)||this).nn={},s.tn=0,s.rn=new _e,s.en=new _e,s.on=new _e,s.un=0,s.an=new Set,s.cn=function(){var h=s.fn,d=h.installing;s.tn>0||!ke(d.scriptURL,s.sn.toString())||performance.now()>s.un+6e4?(s.vn=d,h.removeEventListener("updatefound",s.cn)):(s.hn=d,s.an.add(d),s.rn.resolve(d)),++s.tn,d.addEventListener("statechange",s.ln)},s.ln=function(h){var d=s.fn,f=h.target,x=f.state,$=f===s.vn,T={sw:f,isExternal:$,originalEvent:h};!$&&s.mn&&(T.isUpdate=!0),s.dispatchEvent(new te(x,T)),x==="installed"?s.wn=self.setTimeout(function(){x==="installed"&&d.waiting===f&&s.dispatchEvent(new te("waiting",T))},200):x==="activating"&&(clearTimeout(s.wn),$||s.en.resolve(f))},s.yn=function(h){var d=s.hn,f=d!==navigator.serviceWorker.controller;s.dispatchEvent(new te("controlling",{isExternal:f,originalEvent:h,sw:d,isUpdate:s.mn})),f||s.on.resolve(d)},s.gn=(c=function(h){var d=h.data,f=h.ports,x=h.source;return D(s.getSW(),function(){s.an.has(x)&&s.dispatchEvent(new te("message",{data:d,originalEvent:h,ports:f,sw:x}))})},function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];try{return Promise.resolve(c.apply(this,h))}catch(f){return Promise.reject(f)}}),s.sn=r,s.nn=n,navigator.serviceWorker.addEventListener("message",s.gn),s}var t,o;o=i,(t=e).prototype=Object.create(o.prototype),t.prototype.constructor=t,Ce(t,o);var a=e.prototype;return a.register=function(r){var n=(r===void 0?{}:r).immediate,s=n!==void 0&&n;try{var c=this;return D((function(h,d){var f=h();return f&&f.then?f.then(d):d(f)})(function(){if(!s&&document.readyState!=="complete")return Xe(new Promise(function(h){return window.addEventListener("load",h)}))},function(){return c.mn=!!navigator.serviceWorker.controller,c.dn=c.pn(),D(c.bn(),function(h){c.fn=h,c.dn&&(c.hn=c.dn,c.en.resolve(c.dn),c.on.resolve(c.dn),c.dn.addEventListener("statechange",c.ln,{once:!0}));var d=c.fn.waiting;return d&&ke(d.scriptURL,c.sn.toString())&&(c.hn=d,Promise.resolve().then(function(){c.dispatchEvent(new te("waiting",{sw:d,wasWaitingBeforeRegister:!0}))}).then(function(){})),c.hn&&(c.rn.resolve(c.hn),c.an.add(c.hn)),c.fn.addEventListener("updatefound",c.cn),navigator.serviceWorker.addEventListener("controllerchange",c.yn),c.fn})}))}catch(h){return Promise.reject(h)}},a.update=function(){try{return this.fn?D(Xe(this.fn.update())):D()}catch(r){return Promise.reject(r)}},a.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(r){try{return D(this.getSW(),function(n){return Qe(n,r)})}catch(n){return Promise.reject(n)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&Qe(this.fn.waiting,go)},a.pn=function(){var r=navigator.serviceWorker.controller;return r&&ke(r.scriptURL,this.sn.toString())?r:void 0},a.bn=function(){try{var r=this;return D((function(n,s){try{var c=n()}catch(h){return s(h)}return c&&c.then?c.then(void 0,s):c})(function(){return D(navigator.serviceWorker.register(r.sn,r.nn),function(n){return r.un=performance.now(),n})},function(n){throw n}))}catch(n){return Promise.reject(n)}},(function(r,n,s){return n&&uo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r})(e,[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])})((function(){function i(){this.Pn=new Map}var e=i.prototype;return e.addEventListener=function(t,o){this.jn(t).add(o)},e.removeEventListener=function(t,o){this.jn(t).delete(o)},e.dispatchEvent=function(t){t.target=this;for(var o,a=ho(this.jn(t.type));!(o=a()).done;)(0,o.value)(t)},e.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},i})());const wo=L`h1,h2,h3,h4,h5{margin:0}dl,p{margin:0}a{color:#09c;text-decoration:underline;cursor:pointer}a:hover{color:#007aa3}.main-heading,.subheading{font-family:Museo-300,Arial,sans-serif;font-size:1.25rem;font-weight:400;line-height:1.5rem}.subheading{color:var(--subheading-color,#333);margin-bottom:var(--spacing-small)}.app-footer .subheading{--subheading-color:#fff}.main-heading-frame{--main-heading-color:#fff;padding:var(--spacing-medium) 0 0;background-color:#003d79}.main-heading{padding:0 0 var(--spacing-medium);color:var(--main-heading-color,#09c);font-weight:400;border-bottom:5px solid #09c}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.default-label-note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.small-text{font-size:.875rem;line-height:1.25rem}ul{margin:0;padding:0;list-style-type:none}.bullet-list{list-style-type:disc}.splash-screen-loader-wrapper{display:grid;place-items:center;z-index:1000;background-color:#fff;opacity:1;transition:opacity 2s ease;height:100vh;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.loader{position:relative;display:block;width:.75rem;height:.75rem;margin:4em auto 1.5em;background-color:rgba(255,255,255,0);border-radius:50%;animation:shadowBounce 1s infinite linear}.loader:before{content:"";position:absolute;top:0;left:0;display:block;width:.75rem;height:4px;border-radius:50%;animation:inceptionShadowBounce 1s infinite linear}@keyframes shadowBounce{0%,100%{box-shadow:-2.5em -1em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}10%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}20%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -1.2em 0 0 #26a5a8,0 -1em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}30%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -1.2em 0 0 #4db284,1.25em -1em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}40%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -1.7em 0 0 #4db284,1.25em -1.2em 0 0 #73be60,2.5em -1em 0 0 #99ca3c}50%{box-shadow:-2.5em -3em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -1.7em 0 0 #73be60,2.5em -1.2em 0 0 #99ca3c}60%{box-shadow:-2.5em -2.9em 0 0 #09c,-1.25em -3em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -2.4em 0 0 #73be60,2.5em -1.7em 0 0 #99ca3c}70%{box-shadow:-2.5em -2.4em 0 0 #09c,-1.25em -2.9em 0 0 #26a5a8,0 -3em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -2.4em 0 0 #99ca3c}80%{box-shadow:-2.5em -1.7em 0 0 #09c,-1.25em -2.4em 0 0 #26a5a8,0 -2.9em 0 0 #4db284,1.25em -3em 0 0 #73be60,2.5em -2.9em 0 0 #99ca3c}90%{box-shadow:-2.5em -1.2em 0 0 #09c,-1.25em -1.7em 0 0 #26a5a8,0 -2.4em 0 0 #4db284,1.25em -2.9em 0 0 #73be60,2.5em -3em 0 0 #99ca3c}}@keyframes inceptionShadowBounce{0%,100%{box-shadow:-2.5em 1em 0 0 #4d7380,-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.35)}10%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 #676767,0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.55)}20%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.95),0 1em 0 0 grey,1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 rgba(131,131,131,.76)}30%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.95),1.25em 1em 0 0 #8f8f8f,2.5em 1em 0 0 rgba(131,131,131,.95)}40%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.76),1.25em 1em 0 0 rgba(143,143,143,.95),2.5em 1em 0 0 #838383}50%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.31),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.76),2.5em 1em 0 0 rgba(131,131,131,.95)}60%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.35),-1.25em 1em 0 0 rgba(103,103,103,.31),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.55),2.5em 1em 0 0 rgba(131,131,131,.76)}70%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.55),-1.25em 1em 0 0 rgba(103,103,103,.35),0 1em 0 0 rgba(128,128,128,.31),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.55)}80%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.76),-1.25em 1em 0 0 rgba(103,103,103,.55),0 1em 0 0 rgba(128,128,128,.35),1.25em 1em 0 0 rgba(143,143,143,.31),2.5em 1em 0 0 rgba(131,131,131,.35)}90%{box-shadow:-2.5em 1em 0 0 rgba(77,115,128,.95),-1.25em 1em 0 0 rgba(103,103,103,.76),0 1em 0 0 rgba(128,128,128,.55),1.25em 1em 0 0 rgba(143,143,143,.35),2.5em 1em 0 0 rgba(131,131,131,.31)}}.button-group{list-style-type:none;display:inline-flex;flex-wrap:wrap;padding:.125em;margin:0;border:1px solid #f5f5f5;border-radius:3px;background-color:#f0f0f0}.button-group.-full-width{display:flex}.button-group__item{position:relative;flex:0 0 auto;margin:.125em;text-align:center}.button-group.-full-width>.button-group__item{flex:1 0 7em}.button-group__item>label{display:block;margin:0}.button-group__input{position:absolute;z-index:-10;top:0;left:0;opacity:0}.button-group__label{display:block;padding:.75em 1em;border:1px solid transparent;background-color:#fff;color:#777;border-radius:2px;cursor:pointer}.button-group__label:hover{color:#333}.button-group__input:checked~.button-group__label{border-color:#09c;background-color:#e5f4f9;color:#333;cursor:default}.button-group__input:disabled~.button-group__label,.button-group__input:disabled~.button-group__label:hover{background-image:repeating-linear-gradient(-30deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);color:#777;cursor:not-allowed}.button-group__input:focus~.button-group__label{box-shadow:0 0 5px #3b90c9}.button-group__sticker{position:absolute;left:0;transform:translateY(-50%);margin:0}.btn{display:inline-block;font-family:var(--button-font-family, "Museo-300", Arial, sans-serif);font-size:1.125em;line-height:1.3333;padding:.88889em .5em;min-width:var(--button-min-width,8em);border:none;background-color:var(--button-background-color,#99ca3c);color:var(--button-text-color,#fff);border-radius:3px;cursor:pointer}.btn.-small{font-size:1rem;line-height:.65rem;min-width:var(--button-min-width,5em)}.btn:not(:disabled):hover{background-color:var(--button-background-color-hover,#7ba42e)}.btn:disabled{opacity:.6}.form-item{display:block;margin-bottom:var(--spacing-x-large);font-weight:400}.form-item:last-child{margin-bottom:0}.form-item__label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block}.form-item__note{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:var(--spacing-tiny);display:block;font-style:italic;color:#595959}.form-item__field{display:block;width:100%;padding:.5em;font-size:1rem;line-height:1.25rem;border:1px solid #d3d3d3;background-repeat:no-repeat;background-position:calc(100% - .5em) 50%;border-radius:3px;max-width:320px}.form-item__field.-uppercase{text-transform:uppercase}.form-item__field:focus{outline:0;box-shadow:0 0 2px 1px rgba(0,153,204,.39),0 0 4px 3px rgba(0,153,204,.18),0 0 8px 4px rgba(0,153,204,.1)}.form-item__field.-has-validation{padding-right:2em}.form-item__field.-is-valid{border-color:#99ca3c;background-image:url("data:image/svg+xml,%3Csvg width='19px' height='13px' viewBox='0 0 19 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon fill='%2399CA3C' points='6.70967742 13 0 6.29032258 2.09677419 4.19354839 6.70967742 8.80645161 16.3548387 0 18.4516129 2.09677419'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-is-invalid{border-color:#e3097c;background-image:url("data:image/svg+xml,%3Csvg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cpolygon id='Path' fill='%23E3097C' points='12.759145 0.0312229203 14.8804653 2.15254326 9.57716447 7.45584412 14.8804653 12.759145 12.759145 14.8804653 7.45584412 9.57716447 2.15254326 14.8804653 0.0312229203 12.759145 5.33452378 7.45584412 0.0312229203 2.15254326 2.15254326 0.0312229203 7.45584412 5.33452378'%3E%3C/polygon%3E %3C/svg%3E")}.form-item__field.-read-only,.form-item__field:disabled,.form-item__field[disabled]{border-width:0 0 1px;padding-left:0;color:#595959}textarea.form-item__field{min-height:8em}.form-item__multi-input{max-width:320px;display:flex;align-items:center}.form-item__multi-input.-is-as-set{max-width:460px}.form-item__multi-input-separator{flex:0 0 auto;padding:0 .5em}.form-item__multi-input-item{flex:1 0 5em}.form-item__multi-input-item.-fixed-auto-width{flex:0 0 auto;width:auto}.form-radio-line{max-width:320px}.ccards{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.ccards:empty{display:none}.ccard{position:relative;border:1px solid #dedede}.ccard p{margin:0}.ccard>a{text-decoration:none}.ccard.-loading{border:1px dashed #dedede;text-align:center}.ccards.-grid .ccard{flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.ccards{display:grid}.ccards.-grid{grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.ccard,.ccards.-grid .ccard{margin:0}}.ccard__tags{position:absolute;top:0;left:0;display:flex;flex-direction:row-reverse;justify-content:flex-start;width:100%;transform:translateY(-50%)}.ccard__header{display:flex;padding:var(--spacing-small);background-color:#09c;color:#fff}.ccard__header-heading{flex:1 0 auto;color:#fff}.ccard__header-info{flex:0 0 4em;text-align:right;max-height:24px;overflow:hidden}.ccard__content-padding{padding:var(--spacing-medium)}.ccard__heading{margin:0;font-size:1em}.ccard__main-action{display:block;margin:0;font-family:Museo-300}.ccard__main-action-label{display:block;padding:var(--spacing-small);text-align:center;cursor:pointer;background-color:#99ca3c;color:#fff}.ccard__main-action-label.-neutral{background-color:#d8d8d8;color:#333}.ccard__main-action-input:checked+.ccard__main-action-label{background-color:#09c;color:#fff}.ccard__main-action-input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.ccard__add{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background-color:#f5f5f5;color:#333;cursor:pointer}.ccard__add:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.ccard__add-icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.ccard__add-label{flex:0 0 auto;text-decoration:none}.ccard__provider-logo{display:block;max-width:92px;height:auto;margin:0 auto var(--spacing-small)}.tiles-list{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.tiles-list:empty{display:none}.tiles-list__item{position:relative;flex:1 0 14em;margin:0 var(--spacing-x-large) var(--spacing-x-large) 0}@supports (grid-template-columns:repeat(auto-fill,minmax(14em,1fr))){.tiles-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(14em,1fr));grid-gap:var(--spacing-x-large)}.tiles-list__item{margin:0}}.tile-add-service{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:var(--spacing-medium);background-color:#f5f5f5;border:1px solid #dedede;color:#333;text-decoration:none}.tile-add-service:hover{background-color:#e6f2f8;text-decoration:none;color:#333}.tile-add-service__icon{flex:0 0 6em;width:6em;height:6em;margin-bottom:var(--spacing-small);background:linear-gradient(to right,#09c,#09c) 0 50%/100% 1.25em no-repeat,linear-gradient(to bottom,#09c,#09c) 50% 0/1.25em 100% no-repeat}.tile-add-service__label{flex:0 0 auto;text-decoration:none}.tile-loading{display:flex;flex-direction:column;justify-content:center;padding:var(--spacing-medium);border:1px dashed #dedede;text-align:center}.switch-bar{display:flex;justify-content:space-between;align-items:center;border:1px solid #d3d3d3;border-width:1px 0}.switch-bar__label{padding:.5em 0;margin-right:.5em}.switch{position:relative}.switch__input{position:absolute;opacity:0;z-index:-1}.switch__icon{display:block;min-width:2.5rem;width:var(--switch-icon-width,3em);min-height:2.5rem;cursor:pointer;background-color:transparent}.switch__icon:after,.switch__icon:before{content:"";position:absolute;display:block}.switch__icon:before{top:50%;transform:translateY(-50%);width:100%;height:var(--switch-icon-bg-height,1.5rem);border-radius:calc(var(--switch-icon-bg-height,1.5rem)/ 2);box-shadow:inset 0 0 0 2px #a4b9c1,inset 0 4px 3px 0 rgba(0,0,0,.22);background-color:#e83a96;will-change:background-color;transition:background-color 150ms ease-in-out}.switch__icon:after{top:calc(50% - var(--switch-icon-toggle-diameter,1.5rem)/ 2);width:var(--switch-icon-toggle-diameter,1.5rem);height:var(--switch-icon-toggle-diameter,1.5rem);border-radius:50%;background-image:linear-gradient(-180deg,#e2e2e2 0,#91c6d7 100%);box-shadow:inset 0 0 0 2px #a4b9c1,0 2px 2px 0 rgba(0,30,40,.34);transform:translateX(0);will-change:transform;transition:transform 150ms ease-in-out}.switch__input:checked+.switch__icon:before{background-color:#99ca3c}.switch__input:checked+.switch__icon:after{transform:translateX(var(--switch-icon-width,3em)) translateX(calc(var(--switch-icon-toggle-diameter,1.5rem) * -1))}.info-bar{display:flex;align-items:flex-start;flex-wrap:wrap;padding:1em 0;border:1px solid #dedede;border-width:1px 0;font-family:Museo-300;line-height:1.5}.info-bar.-align-center{align-items:center}.info-bar.-compact{padding:.5em 0;font-family:Helvetica,Arial,sans-serif}.info-bar+.info-bar{border-width:0 0 1px 0}.info-bar__label{flex:0 0 17em;margin:0}.info-bar.-compact>.info-bar__label{flex-basis:10em}.info-bar__info{flex:1 1 17em;margin:0;word-break:break-all}.flex-grid{display:flex;flex-wrap:wrap;background-color:#d3d3d3}.flex-grid__section{display:flex;flex-wrap:wrap;flex:0 0 100%}.flex-grid__cell{flex:9999 0 14em;padding:.75rem;outline:1px solid #d3d3d3;background-color:#fff}.flex-grid__cell.-medium{flex:2 0 14em}.flex-grid__cell.-small{flex:1 0 7em}.flex-grid__label{margin:0;font-size:.75em;text-transform:uppercase;line-height:1.333}.flex-grid__label.-secondary{font-style:italic;text-transform:none}.flex-grid__info{margin:0 0 .5rem;font-size:1.125em;line-height:1.333}.flex-grid__info:last-child{margin:0}.logo-pills{list-style-type:none;display:flex;flex-wrap:wrap;padding:0}.logo-pills__item{flex:1 0 10.5em;margin:0 1em 1em 0}@supports (grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr))){.logo-pills{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5em,1fr));grid-gap:1em}.logo-pills__item{position:relative;margin:0}}.logo-pills__input{position:absolute;top:0;left:0;opacity:0;z-index:-10}.logo-pills__frame{display:flex;flex-direction:column;align-items:center;padding:1em;border:1px solid #dedede}.logo-pills__frame:hover{border-color:#09c}.logo-pills__input:checked+.logo-pills__frame{border-color:#09c;background-color:#e5f4f9}.logo-pills__frame.-disabled,.logo-pills__input:disabled+.logo-pills__frame{opacity:.6}.logo-pills__frame.-disabled:hover,.logo-pills__input:disabled+.logo-pills__frame:hover{border-color:#dedede}.logo-pills__click-area{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;cursor:pointer;z-index:2}.logo-pills__frame.-disabled .logo-pills__click-area,.logo-pills__input:disabled+.logo-pills__frame .logo-pills__click-area{cursor:not-allowed}.logo-pills__label{display:block;margin:.25em 0 .5em}.logo-pills__img{max-width:92px;height:auto;margin:.25em 0 .5em}.logo-pills__availability{position:absolute;top:-.5em;left:0;z-index:2}.summary-list{padding:0 0 0 1em;margin:0;list-style-type:none}.summary-list__label{position:relative;font-size:.8125em}.summary-list__label:not(:first-child){margin-top:.61538em}.summary-list__label.-main:not(:first-child){margin-top:1.2307em}.summary-list__label.-main:before{content:"";position:absolute;top:50%;left:-1em;transform:translateY(-50%);display:block;width:.61538em;height:.61538em;background-color:#09c;border-radius:50%}.summary-list__description{margin:0;font-size:1em;line-height:1.5;word-break:break-word}.summary-list__description.-min-two-lines{min-height:3em}.summary-list-csp-logo{max-width:92px;height:auto;margin:0;display:block;float:right}vaadin-dialog-overlay{--spacing-tiny:0.25rem;--spacing-small:0.5rem;--spacing-medium:1rem;--spacing-large:1.5rem;--spacing-x-large:2rem;--spacing-xx-large:2.5rem;--subheading-color:#09c}.no-indent-section{--step-section-content-indentation:0}[slot=body]{margin-top:var(--spacing-small)}.navbar{background-color:#014482}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all;color:#fff}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.border-top{border-top:1px solid #e5e5e5}.border-bottom{border-bottom:1px solid #e5e5e5}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}button.accept-policy{font-size:1rem;line-height:inherit}html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%;white-space:nowrap;height:60px;line-height:60px}.museo-300{font-family:Museo-300}h1,h2,h3,h4{font-family:Museo-300;font-size:1.3em;font-weight:400}h1{font-size:2em;margin-bottom:.5em}h2{font-size:1.25rem}h4{font-size:1.1em}a.basic-link,a:not([href]):not([tabindex]).basic-link{font-size:14px;font-family:Arial,Helvetica,sans-serif;text-decoration:underline;color:#09c;cursor:pointer}select:disabled{background-color:#eee}.container{max-width:722px}.navbar-nav{list-style-type:none}.navbar-nav>li{margin:16px}.large-margin-top{margin-top:70px}.medium-margin-top{margin-top:45px}.small-margin-top{margin-top:20px}.align-right{text-align:right}.medium-padding{padding:20px}.u-block{display:block}.u-margin-none{margin:0}.u-margin-bottom-large{margin-bottom:2em}.u-padding-small{padding:.5rem}.u-padding-bottom-large{padding-bottom:2em}.u-small-text{font-size:.875rem}.u-mini-text{font-size:.75rem}.green-btn{display:inline-block;background-color:#99ca3c;color:#fff;font-family:Museo-300;padding:15px 50px;border:0;border-radius:4px;text-decoration:none;font-size:1rem}.green-btn:hover{color:#fff;text-decoration:none}.green-btn:disabled{background-color:#ccc}.default-label{font-family:Arial,Helvetica,sans-serif}.standard-text{font-size:14px;font-family:Arial,Helvetica,sans-serif}.legal-text{font-size:13px;font-family:Arial,Helvetica,sans-serif}.pricing-section{background-color:#eee;padding:10px 0}.service-container{display:inline-block;border:solid 1px #ddd;margin:10px;padding:10px}.service-container div{background-color:#99ca3c;color:#fff;font-family:Museo-300;text-align:center;cursor:pointer;padding:10px;margin-top:5px}.bold-text{font-weight:700}.radio-pills{list-style-type:none;padding-left:0}.radio-pills__item{display:inline-block;position:relative;margin:.25em .25em .25em 0}.radio-pills.-stacked .radio-pills__item{display:block}.radio-pills.-stacked .radio-pills__item:not(:last-child){margin-bottom:.5em}.radio-pills__input{position:absolute;width:1px;height:1px;overflow:hidden;z-index:-1;opacity:0}.radio-pills__label{background-color:#f7f8f8;border:1px solid #b3d0e9;border-radius:1.25em;color:#666;line-height:1;padding:.75em 1.5em;text-align:center;display:block;cursor:pointer}.radio-pills.-stacked .radio-pills__label{display:flex;justify-content:space-between;align-items:center;text-align:left;padding-left:2.25em}.radio-pills.-stacked .radio-pills__label:before{content:"";position:absolute;left:1em;width:1em;height:1em;background-color:#fff;border-radius:50%;border:1px solid #09c}.radio-pills__label:hover{background:#e6f2f8}.radio-pills__input:disabled:not(:checked)+.radio-pills__label,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label{cursor:not-allowed;background-image:repeating-linear-gradient(45deg,#e5e5e5,#e5e5e5 1px,transparent 1px,transparent 4px);border-color:#d5d5d5}.radio-pills__input:disabled:not(:checked)+.radio-pills__label:hover,.radio-pills__input[disabled]:not(:checked)+.radio-pills__label:hover{background-color:#f7f8f8}.radio-pills.-stacked .radio-pills__input:disabled:not(:checked)+.radio-pills__label:before,.radio-pills.-stacked .radio-pills__input[disabled]:not(:checked)+.radio-pills__label:before{border-color:#b5b5b5}.radio-pills__input:checked+.radio-pills__label{background-color:#eaf4d8;border-color:#99ca3c;color:#5c7a24}.radio-pills.-stacked .radio-pills__input:checked+.radio-pills__label:before{background-image:radial-gradient(circle,#09c 50%,transparent 55%,transparent);background-repeat:no-repeat}.radio-pills__info{flex:0 1 40%;font-style:italic;font-weight:700;color:#000}.radio-card__input{position:absolute;opacity:0;z-index:-10}.radio-card__main-action{overflow:hidden}.radio-card__dual-label{position:relative;transition:transform 150ms ease-in-out}.radio-card__input:checked+.radio-card__dual-label{transform:translateY(-100%)}.radio-card__input:disabled+.radio-card__dual-label *{background-image:repeating-linear-gradient(-45deg,transparent 0,transparent 3px,rgba(0,0,0,.1) 3px,rgba(0,0,0,.1) 4px);cursor:not-allowed}.radio-card__default-label{display:block;padding:.5em;text-align:center;background-color:#dedede;color:#000}.radio-card__alternate-label{position:absolute;top:100%;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background-color:#09c;color:#fff}.gauge{border:1px solid #dedede}.gauge>*{height:.5em;background-color:#dedede}.default-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem}.alternate-label{font-size:.875rem;font-weight:400;line-height:1rem;margin:0;margin-bottom:.25rem;display:block;font-style:italic}.status-timeline{list-style-type:none;margin:0 0 2em;padding:0}.status-timeline__item{position:relative;padding:0 0 3em;padding-left:4rem;background:repeating-linear-gradient(#e0e0e0,#e0e0e0 .75rem,transparent .75rem,transparent 1rem) 1.9rem 0 100% repeat-y}.status-timeline__item.-success{background:linear-gradient(#09c,#09c) 1.9rem 0 100% repeat-y}.status-timeline__item:last-child{background-image:none;padding-bottom:0}.status-timeline__icon{position:absolute;top:0;left:1.25rem;width:1.5rem;height:1.5rem;background-color:#e0e0e0;border-radius:1.5rem;background-repeat:no-repeat;background-position:50% 50%}.status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='140px' height='36px' viewBox='0 0 140 36' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M18,36 C8.0588745,36 0,27.9411255 0,18 C0,8.0588745 8.0588745,0 18,0 C27.9411255,0 36,8.0588745 36,18 C36,27.9411255 27.9411255,36 18,36 Z M70,36 C60.0588745,36 52,27.9411255 52,18 C52,8.0588745 60.0588745,0 70,0 C79.9411255,0 88,8.0588745 88,18 C88,27.9411255 79.9411255,36 70,36 Z M122,36 C112.058875,36 104,27.9411255 104,18 C104,8.0588745 112.058875,0 122,0 C131.941125,0 140,8.0588745 140,18 C140,27.9411255 131.941125,36 122,36 Z' id='Combined-Shape' fill='%23ffffff'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-success .status-timeline__icon{background-color:#09c}.status-timeline__item.-success .status-timeline__icon:empty{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E %3Cpolygon fill='%23ffffff' fill-rule='evenodd' points='19.227 8 13.174 14.053 10.799 11.654 10 12.453 13.174 15.627 19.999 8.8' transform='translate(-10 -8)'/%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-pending .status-timeline__icon{background-color:#8c8c8c}.status-timeline__item.-pending .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='141px' height='156px' viewBox='0 0 141 156' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='two-circling-arrows' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M35.735,121.521 C22.965,111.248 14.793,95.496 14.793,77.83 C14.793,51.716 32.675,29.838 56.844,23.6 L56.844,9.154 C24.854,15.646 0.776,43.927 0.776,77.83 C0.776,98.781 9.975,117.568 24.543,130.408 C35.819,140.911 42.827,126.894 35.735,121.521 Z M116.589,24.746 C109.409,18.261 98.896,28.774 105.788,33.982 C118.676,44.252 126.931,60.079 126.931,77.83 C126.931,103.948 109.046,125.83 84.879,132.064 L84.879,146.513 C116.869,140.014 140.947,111.737 140.947,77.829 C140.947,56.602 131.502,37.596 116.589,24.746 Z M63.037,35.707 L85.85,22.046 C89.169,20.058 89.176,16.82 85.868,14.818 L62.844,0.883 C59.532,-1.116 56.859,0.393 56.8749285,4.264 L56.999,32.299 C57.009,36.168 59.714,37.695 63.037,35.707 Z M78.883,120.029 L55.856,133.964 C52.545,135.966 52.552,139.203 55.875,141.192 L78.686,154.854 C82.005,156.838 84.716,155.316 84.733,151.442 L84.8530402,123.408 C84.865,119.54 82.188,118.03 78.883,120.029 Z' id='Shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__item.-error .status-timeline__icon{background-color:#d00232}.status-timeline__item.-error .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='22px' height='22px' viewBox='0 0 22 22' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='cancel' fill='%23ffffff' fill-rule='nonzero'%3E %3Cpath d='M14.1,11.3 C13.9,11.1 13.9,10.8 14.1,10.6 L21.6,3.1 C21.8,2.9 21.9,2.6 21.9,2.4 C21.9,2.2 21.8,1.9 21.6,1.7 L20.2,0.3 C20,0.1 19.7,0 19.5,0 C19.2,0 19,0.1 18.8,0.3 L11.3,7.8 C11.1,8 10.8,8 10.6,7.8 L3.1,0.3 C2.9,0.1 2.6,0 2.4,0 C2.2,0 1.9,0.1 1.7,0.3 L0.3,1.7 C0.1,1.9 0,2.2 0,2.4 C0,2.6 0.1,2.9 0.3,3.1 L7.8,10.6 C8,10.8 8,11.1 7.8,11.3 L0.3,18.8 C0.1,19 0,19.3 0,19.5 C0,19.7 0.1,20 0.3,20.2 L1.7,21.6 C1.9,21.8 2.2,21.9 2.4,21.9 C2.6,21.9 2.9,21.8 3.1,21.6 L10.6,14.1 C10.8,13.9 11.1,13.9 11.3,14.1 L18.8,21.6 C19,21.8 19.3,21.9 19.5,21.9 C19.7,21.9 20,21.8 20.2,21.6 L21.6,20.2 C21.8,20 21.9,19.7 21.9,19.5 C21.9,19.3 21.8,19 21.6,18.8 L14.1,11.3 Z' id='Path'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");background-size:.5rem .5rem}.status-timeline__item.-warning .status-timeline__icon{background-color:#f1941f}.status-timeline__item.-warning .status-timeline__icon:empty{background-image:url("data:image/svg+xml, %3Csvg width='48px' height='228px' viewBox='0 0 48 228' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M24.154,0.005 C36.216,0.005 46.421,6.81 46.421,18.871 C46.421,55.674 42.092,108.558 42.092,145.36 C42.092,154.947 31.577,158.967 24.155,158.967 C14.259,158.967 5.908,154.947 5.907,145.36 C5.907,108.557 1.578,55.673 1.578,18.871 C1.578,6.809 11.474,0.005 24.154,0.005 Z M24.465,180.306 C37.144,180.306 47.97,191.13 47.97,204.12 C47.97,216.8 37.145,227.934 24.465,227.934 C10.857,227.934 0.651,216.8 0.651,204.12 C0.651,191.13 10.858,180.306 24.465,180.306 Z' id='Combined-Shape' fill='%23ffffff' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");background-size:.75rem .75rem}.status-timeline__icon.-anim-rotate{-webkit-animation:icon-rotation 1.2s infinite;animation:icon-rotation 1.2s infinite;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}.status-timeline__heading{margin:0 0 .4em;font-size:1.5em;font-weight:400;font-family:Museo-300;line-height:1.5rem;color:#ccc}.status-timeline__item.-success .status-timeline__heading{color:#09c}.status-timeline__item.-pending .status-timeline__heading{color:#8c8c8c}.status-timeline__item.-error .status-timeline__heading{color:#d00232}.status-timeline__item.-warning .status-timeline__heading{color:#f1941f}.status-timeline__content>:last-child{margin-bottom:0}@keyframes icon-rotation{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}button{cursor:pointer}.u-app-width{width:100%;max-width:920px;margin-left:auto;margin-right:auto;padding-left:var(--spacing-large);padding-right:var(--spacing-large)}.u-text-right{text-align:right}.u-text-center{text-align:center}.u-float-right{float:right}.u-inline-block{display:inline-block;vertical-align:middle}.u-inline-block.-align-bottom{vertical-align:bottom}.u-inline-block.-align-top{vertical-align:top}.u-margin-top-none{margin-top:0}.u-margin-top-small{margin-top:var(--spacing-small)}.u-margin-top-medium{margin-top:var(--spacing-medium)}.u-margin-bottom-small{margin-bottom:var(--spacing-small)}.u-margin-bottom-medium{margin-bottom:var(--spacing-medium)}.u-margin-bottom-large{margin-bottom:var(--spacing-large)}.u-margin-bottom-x-large,.u-mb-2{margin-bottom:var(--spacing-x-large)}.u-margin-top-xx-large{margin-top:var(--spacing-xx-large)}.u-margin-bottom-xx-large{margin-bottom:var(--spacing-xx-large)}.u-margin-right-medium{margin-right:var(--spacing-medium)}.u-margin-left-medium{margin-left:var(--spacing-medium)}.u-margin-left-x-large{margin-left:var(--spacing-x-large)}:host{display:block;box-sizing:border-box}:host *{box-sizing:border-box}`;class bo extends z{static get styles(){return[wo]}static get properties(){return{updateAvailable:{type:Boolean},updating:{type:Boolean},workboxInstance:{type:Object}}}firstUpdated(){this.init()}init(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{this.register()})}register(){this.workboxInstance=new fo("/service-worker-root.js"),this.workboxInstance.addEventListener("waiting",()=>{this.updateAvailable=!0}),this.workboxInstance.addEventListener("installed",e=>{e.isUpdate&&(this.updateAvailable=!0),this.updateAvailable&&this.updateApplication()}),this.workboxInstance.register()}updateApplication(){this.updating=!0,this.workboxInstance.addEventListener("controlling",()=>{window.location.reload()}),this.workboxInstance.messageSW({type:"SKIP_WAITING"})}render(){return l``}}window.customElements.define("register-service-worker",bo);const vo=(i,e)=>{if(!e)throw new Error("Account number is not available in the token.");const t=xo(i,e),o=fe.filter(n=>t.includes(n.label));o.length>0&&(o.find(n=>n.label===re)||o.unshift(fe.find(n=>n.label===re)),!(o.length===1&&o[0].label===re)&&!o.find(n=>n.label===we)&&o.push(fe.find(n=>n.label===we))),o.length===1&&o[0].label===re&&o.pop();const{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}=et(i,e);return o.map(n=>{let s=`${n.href}?selected_account_number=${e}`;return n.label===ge&&(s=`${n.href}?selected_account_number=${a}`),n.label===ae&&(s=tt(n,r)),n.label===we&&(s=n.href),{...n,href:s}})},et=(i,e)=>{const t=it(i,e),o=ot(t,e);let a,r;return o&&o.portal===ge?a=o.accountNumber:a=Ae(t,ge)||e,o&&o.portal===ae?r=o.accountNumber:r=Ae(t,ae)||e,{emeaPortalAccountNumber:a,marketPlacePortalAccountNumber:r}},tt=(i,e)=>{var t;const o=new URL(i.href);o.searchParams.set("selected_account_number",e);const a=d=>d.toLowerCase().replace(/\/+$/,""),r=a(window.location.pathname),{pathAndQuerystring:n}=window.registeredApps["ui-gom"],s=d=>{const f=a(d.path);return r===f||r.startsWith(f+"/")},c=n.find(s),h=(t=c==null?void 0:c.mppProcessQueryString)!=null?t:null;return o.searchParams.delete("process"),h&&o.searchParams.set("process",h),o.toString()},it=(i,e)=>{if(!e)return null;function t(a){for(const r of a){if(r.accountNumber.toLowerCase()===e.toLowerCase())return r;if(r.subAccounts&&r.subAccounts.length>0){const n=t(r.subAccounts);if(n)return{...r,subAccounts:[n]}}}return null}return i.find(a=>a.accountNumber.toLowerCase()===e.toLowerCase())||t(i)},Ae=(i,e)=>{if(!i)return null;if(i.portal===e)return i.accountNumber;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=Ae(t,e);if(o)return o}return null},xo=(i,e)=>{const t=it(i,e);if(!t)return[];const o=new Set;function a(r){var n;o.add(r.portal),(n=r.subAccounts)!=null&&n.length&&r.subAccounts.forEach(s=>{a(s)})}return a(t),Array.from(o)},ot=(i,e)=>{if(!i)return null;if(i.accountNumber.toLowerCase()===e.toLowerCase())return i;if(i.subAccounts&&i.subAccounts.length>0)for(const t of i.subAccounts){const o=ot(t,e);if(o)return o}return null};var yo=Object.defineProperty,Co=(i,e,t)=>e in i?yo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,_o=(i,e,t)=>Co(i,e+"",t);const at=class rt{constructor(){if(this.registered=!1,this.appInsightsReady=!1,this.queue=[],window[be.appInsights])this.appInsightsReady=!0;else{const e=()=>{this.appInsightsReady=!0,this.processQueue(),window.removeEventListener("appInsightsInitialized",e)};window.addEventListener("appInsightsInitialized",e)}}isBatched(){return!1}getIgnoreUrls(){return[]}send(e){Array.isArray(e)?e.forEach(t=>this.buildTelemetry(t)):this.buildTelemetry(e)}processQueue(){for(;this.queue.length>0;){const e=this.queue.shift();this.buildTelemetry(e)}}buildTelemetry(e){var t,o,a,r,n,s,c,h,d;if(e.type!=="measurement")return;if(!this.appInsightsReady||!window[be.appInsights]){this.queue.push(e);return}const{payload:f,meta:x}=e,$={application:pe,sessionId:(t=x.session)==null?void 0:t.id,pageUrl:(o=x.page)==null?void 0:o.url,browserName:(a=x.browser)==null?void 0:a.name,browserVersion:(r=x.browser)==null?void 0:r.version,browserOs:(n=x.browser)==null?void 0:n.os,measurementId:(s=f.context)==null?void 0:s.id,rating:(c=f.context)==null?void 0:c.rating,navigationType:(h=f.context)==null?void 0:h.navigation_type,navigationEntryId:(d=f.context)==null?void 0:d.navigation_entry_id};Object.keys($).forEach(T=>{$[T]===void 0&&delete $[T]}),Object.entries(e.payload.values).forEach(([T,nt])=>{if(rt.VALID_METRICS.includes(T)){const st=`global-portal-${T}`;window[be.appInsights].trackMetric({name:st,average:nt},$)}})}register(){if(this.registered)return;const e=()=>window.faro?(window.faro.transports.add(this),this.registered=!0,!0):!1;if(e())return;let t=0;const o=5,a=setInterval(()=>{t+=1,(e()||t>=o)&&(clearInterval(a),t>=o&&console.warn("Faro SDK not detected after maximum attempts"))},400)}};_o(at,"VALID_METRICS",["cls","lcp","fcp","time_to_first_byte"]);let ko=at;var Ao=Object.defineProperty,Eo=(i,e,t)=>e in i?Ao(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,A=(i,e,t)=>Eo(i,typeof e!="symbol"?e+"":e,t);window.registeredApps["ui-user-management"].enabled&&import("@digital-realty/ui-user-management/ui-user-management.js"),window.registeredApps["ui-service-management"].enabled&&import("@digital-realty/ui-service-management/ui-service-management.js"),window.registeredApps["ui-gom"].enabled&&import("http://localhost:8090/ui-mfe-gom.js"),(window.registeredApps["ui-inventory"].enabled||window.registeredApps["ui-sites"].enabled)&&import("@digital-realty/ui-inventory/ui-inventory.js"),window.registeredApps["ui-launchpad"].enabled&&import("@digital-realty/ui-launchpad/ui-launchpad.js"),window.registeredApps["ui-dcim-charts"].enabled&&import("@digital-realty/ui-mfe-dcim/ui-mfe-dcim.js"),window.registeredApps["ui-dcim-reports"].enabled&&import("@digital-realty/ui-mfe-reports/ui-mfe-reports.js"),window.registeredApps["ui-my-account"].enabled&&import("@digital-realty/ui-my-account/ui-my-account.js"),window.registeredApps["ui-esg"].enabled&&import("http://localhost:8091/ui-mfe-esg.js"),window.getAppVersions=Ii;class No extends M{constructor(){super(),A(this,"checkActivityInterval",1e4),A(this,"inactiveDuration",9e5),A(this,"accounts",[]),A(this,"timeoutController",new ct(this,()=>(this.detectLoggedOut(),g.compareLastActive(this.inactiveDuration)),()=>{g.showAutoLogout||(g.showAutoLogout=+new Date)},g.hydrateStore,this.checkActivityInterval)),A(this,"_clearSessionKeys",()=>{sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount")}),A(this,"_initQualtricsDataLayer",()=>{window._setQualtricsDataLayer=yt,window.addEventListener("setQualtricsDataLayer",this._pushQualtricsData)}),A(this,"_pushQualtricsData",e=>{window.dataLayer=window.dataLayer||[];const{dataLayer:t}=window,o=t.length>0?t[t.length-1]:null,a={event:"qualtrics",...e.detail};(o==null?void 0:o.event)==="qualtrics"&&Object.keys(a).every(r=>o[r]===a[r])||window.dataLayer.push(a)}),A(this,"anAppIsActive",()=>this.isDashboardActive||!!Hi(window.location.pathname)),A(this,"renderApps",()=>l` ${this.isDashboardActive&&this.isMfeEnabled("ui-launchpad")?l` <ui-launchpad></ui-launchpad> `:v} ${this.isMfeEnabled("ui-my-account")?l` <div class="${this.isAccActive?"":"zero-width-height"}"> <ui-my-account baseUrl="/my-account"></ui-my-account> </div> `:v} ${this.isMfeEnabled("ui-service-management")?l` <div class="${this.isSMActive?"":"zero-width-height"}"> <ui-service-management baseUrl="/service-management"></ui-service-management> </div> `:v} ${this.isMfeEnabled("ui-gom")?l` <div class="${this.isGOMActive?"":"zero-width-height"}"> <ui-mfe-gom></ui-mfe-gom> </div> `:v} ${this.isMfeEnabled("ui-user-management")?l` <div class="${this.isUMActive?"":"zero-width-height"}"> <ui-user-management data-theme="ix-theme" baseUrl="/user-management"></ui-user-management> </div> `:v} ${this.isMfeEnabled("ui-sites")?l` <div class="${this.isSITEActive?"":"zero-width-height"}"> <ui-inventory data-theme="ix-theme" baseUrl="${window.registeredApps["ui-sites"].path}"></ui-inventory> </div> `:v} ${this.isMfeEnabled("ui-knowledge-base")?l` ${this.isKBActive?l` <iframe title="Knowledge Base" class="w-full h-full" src="${this.knowledgeBaseIframeURL}"></iframe> `:v} `:v} ${this.isMfeEnabled("ui-dcim-charts")?l` <div class="${this.isDCIMChartsActive?"":"zero-width-height"}"> <ui-mfe-charts class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-charts"].path}"></ui-mfe-charts> </div> `:v} ${this.isMfeEnabled("ui-dcim-reports")?l` <div class="${this.isDCIMReportsActive?"":"zero-width-height"}"> <ui-mfe-reports class="md:mx-4 lg:mx-0 block" baseUrl="${window.registeredApps["ui-dcim-reports"].path}"></ui-mfe-reports> </div> `:v} ${this.isMfeEnabled("ui-esg")?l` <div class="${this.isESGActive?"":"zero-width-height"}"> <ui-mfe-esg></ui-mfe-esg> </div> `:v} `),A(this,"_handleAutoLogoutClose",()=>{this.detectLoggedOut(!0),g.showAutoLogout=0,this.timeoutController.setInterval()}),A(this,"_setAllCookies",(e,t)=>{const o=Object.keys(ne).map(a=>({cookie_name:ne[a],cookie_version:ve,accepted:e,user_action:t}));this.isCookieExpired=!1,this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.revokedConsent&&window.location.reload()}),A(this,"_processTargetingCookieChange",e=>{}),A(this,"_processPerformanceCookieChange",e=>{var t;const o=(t=e.find(a=>a.cookie_name===ne.performance))==null?void 0:t.accepted;this._getCookieConsent("performance")!==o&&(window.dataLayer&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o}),o||(Ri(),this.revokedConsent=!0))}),A(this,"_checkForCookieExpiry",()=>{if(!g.cookiesAccepted)return;const e=Date.now();g.cookiesAccepted.forEach(t=>{(new Date(t.expires).getTime()<e||t.cookie_version!==ve)&&(this.isCookieExpired=!0)})}),this.appReady=!1,this.compact=!0,this.isAppVersionsVisible=!1,this.isCustomiseCookiesVisible=!1,this.isCookieExpired=!1,this.revokedConsent=!1,this.processingConsent=!1,localStorage.setItem("compact",!0),window._setQualtricsDataLayer=()=>{},sessionStorage.setItem(me.SessionStorage.HasOutstandingChanges,"false")}detectLoggedOut(e){if(!Ft()){const t=window.location.pathname;if(t==="/session-expired"||t==="/authenticate")return!1;sessionStorage.removeItem("accountSelection:lastAll"),sessionStorage.removeItem("accountSelection:lastFiltered"),sessionStorage.removeItem("accountSelection:selectedAccount"),window.location.href=e?"/logout?isIdle=true":"/logout"}return!0}connectedCallback(){super.connectedCallback(),this.pageWidthElem=this.querySelector("#page-width"),this.intraPortalNavbarItems=[],window.addEventListener("keydown",g.setLastActive),window.addEventListener("click",g.setLastActive),window.addEventListener("scroll",g.setLastActive),window.addEventListener("touchstart",g.setLastActive),Vi(),window.addEventListener("accountsloaded",this.filterIntraNavBarItems.bind(this)),window.addEventListener("beforeunload",this._clearSessionKeys)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",g.setLastActive),window.removeEventListener("click",g.setLastActive),window.removeEventListener("scroll",g.setLastActive),window.removeEventListener("touchstart",g.setLastActive),window.removeEventListener("beforeunload",this._clearSessionKeys),window.removeEventListener("accountsloaded",this.filterIntraNavBarItems),window.removeEventListener("setQualtricsDataLayer",this._pushQualtricsData)}checkAccountExists(e,t){var o;let a=null;for(const r of t){if(r.accountNumber.toLowerCase()===e.toLowerCase()||((o=r.parentAccountNumber)==null?void 0:o.toLowerCase())===e.toLowerCase()){a=r;break}if(r.subAccounts&&r.subAccounts.length>0&&(a=this.checkAccountExists(e,r.subAccounts),a))break}return a}async detectQueryParamsAndSwitchAccount(){const e=new URLSearchParams(window.location.search),t=e.get("selected_account_number");if(t!=null){const o=await V({page_size:1,account_number:t}),a=this.checkAccountExists(t,o.items);e.delete("selected_account_number");let r=window.location.origin+window.location.pathname;const n=e.toString();if(n&&(r+=`?${n}`),window.history.replaceState({},"",r),a)if(a.parentAccountNumber){const s=this.checkAccountExists(a.parentAccountNumber,o.items);s&&await de(s.accountNumber)}else await de(a.accountNumber)}}static get properties(){return{appTitle:{type:String},currentPath:{type:String},compact:{type:Boolean,reflect:!0},isAppVersionsVisible:{type:Boolean},isCustomiseCookiesVisible:{type:Boolean},isCookieExpired:{type:Boolean},intraPortalNavbarItems:{type:Array}}}static get styles(){return[Ue,Ct,k,ji]}update(e){this.appReady=this.anAppIsActive(),super.update(e)}async firstUpdated(){if(!Zt())return;await g.hydrateStore(),g.setLastActive(),g.showAutoLogout=0,await g.hydrateStore(),this.timeoutController.setInterval(),window.addEventListener(I.VaadinRouterLocationChanged,()=>{var a,r;if((a=this.intraPortalNavbarItems)!=null&&a.length){const n=K(),{marketPlacePortalAccountNumber:s}=et(this.accounts,(r=n==null?void 0:n.profile)==null?void 0:r.account_number);this.intraPortalNavbarItems=this.intraPortalNavbarItems.map(c=>c.label===ae?{...c,href:tt(c,s)}:c)}this.requestUpdate()}),await lt.hydrateStore();const e=await Di();this.saveDateTimeFormatToLocalStorage(e),this.detectQueryParamsAndSwitchAccount(),this._checkForCookieExpiry();const t=this._getCookieConsent("targeting"),o=this._getCookieConsent("performance");if(o||Pi(),window.dataLayer){t&&this._getAccountDetails();const a={};(t||o)&&window.dataLayer.push({event:"cookie_consent",cookieConsentPerformance:o,...a})}new ko().register()}_getAccountDetails(){var e,t;const o=(e=JSON.parse(localStorage.getItem(Me)||{}))==null?void 0:e.profile,{account_number:a,hashed_identifier:r}=o!=null?o:{},n=(t=JSON.parse(localStorage.getItem(Bt)||"{}"))==null?void 0:t.name;return{account_number:a,hashed_identifier:r,user_name:n}}_getCookieConsent(e){const t=g.cookiesAccepted.find(o=>o.cookie_name===ne[e]);return t==null?void 0:t.accepted}saveDateTimeFormatToLocalStorage(e){localStorage.setItem(jt,JSON.stringify({preferredDateFormat:e.preferredDateFormat,preferredTimeFormat:e.preferredTimeFormat,preferredTimezone:e.preferredTimezone})),this.dispatchEvent(new CustomEvent("dateFormatChanged",{bubbles:!0,composed:!0}))}async filterIntraNavBarItems(){var e;if(this.accounts.length>0)return!1;const t=await V();this.accounts=t.items;const o=K(),a=(e=o==null?void 0:o.profile)==null?void 0:e.account_number;this.intraPortalNavbarItems=vo(this.accounts,a)}get isDashboardActive(){return window.location.pathname==="/"}get isAccActive(){return window.location.pathname.startsWith(window.registeredApps["ui-my-account"].path)}get isSMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-service-management"].path)}get isGOMActive(){return(window.registeredApps["ui-gom"].path||[]).some(e=>window.location.pathname.startsWith(e))}get isESGActive(){return window.location.pathname.startsWith(window.registeredApps["ui-esg"].path)}get isUMActive(){return window.location.pathname.startsWith(window.registeredApps["ui-user-management"].path)}get isKBActive(){return window.location.pathname.startsWith(window.registeredApps["ui-knowledge-base"].path)}get isUIActive(){return window.location.pathname.startsWith(window.registeredApps["ui-inventory"].path)}get isSITEActive(){return window.location.pathname.startsWith(window.registeredApps["ui-sites"].path)}get isDCIMChartsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-charts"].path)}get isDCIMReportsActive(){return window.location.pathname.startsWith(window.registeredApps["ui-dcim-reports"].path)}get isCPActive(){return window.location.pathname.startsWith(window.registeredApps[Ut].path)}get knowledgeBaseIframeURL(){const e=window.location.pathname.replace(window.registeredApps["ui-knowledge-base"].path,"");return`${qt}${e}`}get intraportalNavItems(){return this.intraPortalNavbarItems}isMfeEnabled(e){var t;return(t=window.registeredApps[e])==null?void 0:t.enabled}waitForElement(){return new Promise(e=>{new MutationObserver((t,o)=>{const a=this.shadowRoot.querySelector("app-shell-header").shadowRoot.querySelector("account-selection");a&&(o.disconnect(),e(a))}).observe(document.body,{childList:!0,subtree:!0})})}toggleCompact(e){const{isCompact:t}=e.detail;if(t!==void 0){t!==this.compact&&(this.compact=t,localStorage.setItem("compact",`${this.compact}`));return}this.compact=!this.compact,localStorage.setItem("compact",`${this.compact}`)}render(){return this.appReady?this.isCPActive?l`<ix-cookie-policy></ix-cookie-policy>`:l` <div id="page-width"></div> ${v} <div class="fixed inset-0 bg-black opacity-50 z-20 ${this.compact?"hidden":"block"} lg:hidden" @click="${this.toggleCompact}" @keypress="${this.toggleCompact}"></div> <div class="animate-width grid-rows-[min-content] grid grid-cols-1 lg:grid-rows-none lg:grid-cols-[var(--left-bar-width)_minmax(0,auto)] min-h-[--body-height]"> <app-shell-navigation-bar .showAppVersions="${()=>this.isAppVersionsVisible=!0}" .showCustomiseCookies="${()=>this.isCustomiseCookiesVisible=!0}" @toggle-menu="${this.toggleCompact}" ?compact="${this.compact}" class="block drop-shadow-lg relative z-30"></app-shell-navigation-bar> <div class="flex flex-col grow h-full"> <div class="sticky top-0 z-[5]" style="top:var(--intraportal-nav-height,0)"> <app-shell-header></app-shell-header> <register-service-worker></register-service-worker> </div> <main class="grow lg:mx-0 pb-4 lg:px-4 lg:pl-12" id="mfeContainer"> ${this.renderApps()} </main> </div> </div> <ix-notifications style="--md-icon-button-icon-size:29px" data-theme="ix-theme" baseApiUrl="${Gt}" localStorageKey="${Me}"></ix-notifications> ${l` <ix-cookie-dialog ?open="${this.isCustomiseCookiesVisible}" selection="${g.cookiesAccepted.length===0?null:g.cookiesAccepted[0].user_action==="accept_all"?!0:g.cookiesAccepted[0].user_action==="customize"?JSON.stringify(g.cookiesAccepted.reduce((e,t)=>({...e,[t.cookie_name]:t.accepted}),{})):!1}" @closed="${()=>{this.isCustomiseCookiesVisible=!1}}" @accept-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!0,Z.accept),setTimeout(()=>{this.processingConsent=!1},10))}}" @reject-all="${()=>{this.processingConsent||(this.processingConsent=!0,this._setAllCookies(!1,Z.reject),setTimeout(()=>{this.processingConsent=!1},10))}}" @accept-some="${e=>{if(this.processingConsent)return;this.processingConsent=!0;const t=e.detail,o=Object.keys(t).map(a=>({cookie_name:a,cookie_version:ve,accepted:t[a],user_action:Z.custom}));this.revokedConsent=!1,this._processTargetingCookieChange(o),this._processPerformanceCookieChange(o),g.cookiesAccepted=o,je(o),this.isCookieExpired=!1,this.revokedConsent&&window.location.reload(),setTimeout(()=>{this.processingConsent=!1},10)}}" policy-url="${$e}"></ix-cookie-dialog> <ix-cookie-banner ?hidden="${!((g.cookiesAccepted.length===0||this.isCookieExpired)&&!this.isCustomiseCookiesVisible)}" @accept-all="${()=>{this._setAllCookies(!0,Z.accept)}}" @reject-all="${()=>{this._setAllCookies(!1,Z.reject)}}" @no-sell="${()=>{this._setAllCookies(!1,Z.no)}}" @customise-cookies="${()=>{this.isCustomiseCookiesVisible=!0}}" policy-url="${$e}"></ix-cookie-banner> `} <ix-toasters></ix-toasters> <ix-tooltip></ix-tooltip> <ix-app-versions @closed="${()=>this.isAppVersionsVisible=!1}" ?isVisible="${this.isAppVersionsVisible}" .versionsRequest="${Ze}"></ix-app-versions> <ix-auto-logout-dialog .externalCheck="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.lastActive===-1&&(window.location.href="/logout")}}" .timeoutAction="${async()=>{await g.getStoredData(),await g.hydrateStore(),g.showAutoLogout!==0&&(window.location.href="/logout?isIdle=true")}}" opened-at="${g.showAutoLogout}" @closed="${this._handleAutoLogoutClose}" ?open="${g.showAutoLogout>0}"></ix-auto-logout-dialog> `:l``}}window.customElements.define("global-portal-app",No);
package/dist/bootstrap.js CHANGED
@@ -1 +1 @@
1
- import{__decorate as C}from"tslib";import{LitElement as S,html as c}from"lit";import{property as I}from"lit/decorators.js";import{ApplicationInsights as W,DistributedTracingModes as q}from"@microsoft/applicationinsights-web";import{authedUser as R}from"@digital-realty/ix-account-switcher";import{UserManager as Q}from"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";import{makeObservable as Z,action as ee,observable as te,toJS as se}from"mobx";const T="planbglobalportalui",ae="openid service_management_profile offline_access user_management_profile resource.notifications resource.usermanagementapi resource.servicemanagementapi resource.inventory resource.cookieconsents",O="https://login.t1.globalportal.online",re="https://inxn-t1-gpappshell.azureedge.net/?logout=true",P="https://api.t1.globalportal.online",ne="",oe="local",ie="GTM-KXBK8CQP",ce=24,le="https://api.t1.globalportal.online",pe="ui-ticket-updates-accessAt,ix-grid-,-grid,app-state,releaseNotesViewed",ue="https://gp-dev.digitalrealty.com/standalone/knowledge-base",_e="https://portal.interxion.com",de="https://inxn-a1-gpappshell.azureedge.net",Ee="https://demo.servicefabric.digitalrealty.com/",me="https://marketplaceportal.com/group/telx-new-portal",he="gp-tst.digitalrealty.com",ge=!1,Ae="/cookie-policy",Ce="1.0",Se={strict:"strictly_necessary",performance:"performance",targeting:"targeting"},Ie={accept:"accept_all",reject:"reject_all",custom:"customize",no:"no_sell"},N="globalportalappshell",l="user-authentication",_="redirect-url",Re="ui-cookie-policy",Te="date-format",f="Global Portal",w="Service Fabric",L="Marketplace Portal",b="EMEA Customer Portal",Oe="x-auth",[p,Pe,Ne,fe]=["CREATE","UPDATE","READ","APPROVE"],[y,d,we,Le,v,be,wt,ye,U,Lt,ve,Ue,k,x,M,bt,ke,yt,xe,D,V,G,Me,B,De,Ve,H,Ge]=["Cloud Connect","Cross Connect","Custom Roles","Customer Care","Customer Equipment Connection (CEC)","Customer Support","DCIM-enabled location data","Default System Roles","External User","Facility Access","Internal Roles","Internal User","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","OSP Access","Permanent Badge","PoP/POE Room Access","Remote Hands","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Shipping & Receiving","Space & Power","Trouble Ticket","Visitor Access","User","ESG Reporting"],Be=[xe,be,De,Me,Ve,ke,Le],He=[d,y,v,k,x,M,D,V,G,B],je=[d,y,v,k,x,M,D,V,G,B],Fe={LocationChanged:"location-changed",VaadinRouterLocationChanged:"vaadin-router-location-changed",CreateUserClicked:"create-user-clicked"},Ke={SessionStorage:{HasOutstandingChanges:"hasOutstandingChanges"}},[$e,Ye,ze]=["Security","DCIM","Planned Site Maintenance"],Xe=[$e,Ye,ze],Je=[{label:f,href:de,selected:!0},{label:L,href:me},{label:b,href:_e},{label:w,href:Ee,target:"_blank"}],j={appInsights:"_appInsights"},We=()=>{const e=new W({config:{instrumentationKey:ne,enableCorsCorrelation:!0,enableRequestHeaderTracking:!0,enableResponseHeaderTracking:!0,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,enableAjaxErrorStatusText:!0,enableAjaxPerfTracking:!0,enableUnhandledPromiseRejectionTracking:!0,isCookieUseDisabled:!0,distributedTracingMode:q.AI_AND_W3C,correlationHeaderExcludedDomains:he.split(",").map(t=>t.trim())}});return e.loadAppInsights(),e.trackPageView(),e.addTelemetryInitializer(t=>{t.tags["ai.cloud.role"]=N}),e},u=(e,t,s)=>(...a)=>{const[r,...n]=a;typeof r=="string"&&r.startsWith("[mobx]")&&t===4?s.trackException({exception:{message:n[0].message,stack:n[0].stack,name:r},severityLevel:4}):s.trackTrace({severityLevel:t,message:r},n),e.apply(console,[r,...n])},qe=e=>{console.log=u(console.log,2,e),console.info=u(console.info,2,e),console.warn=u(console.warn,3,e),console.error=u(console.error,4,e),window.console=console},Qe=()=>{const e=We();window[j.appInsights]=e,window.dispatchEvent(new Event("appInsightsInitialized")),qe(e)},F=async e=>{const t=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(s)).map(a=>a.toString(16).padStart(2,"0")).join("")};function Ze(){const{location:e}=window,t=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`;return{authority:O,client_id:T,redirect_uri:`${t}/auth-callback`,response_type:"code",scope:ae,post_logout_redirect_uri:re,monitorSession:!1}}const E=new Q(Ze()),et=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(window.atob(t).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(s)},tt=()=>{localStorage.removeItem(l)},i=()=>{const e=localStorage.getItem(l);return e?JSON.parse(e):null},st=async()=>{const e=i();if(!e)return null;const t=(e.profile.given_name||"")+(e.profile.family_name||"")+e.profile.sub;return await F(t)},K=()=>{const e=i();return e?e.id_token:null},$=(e,t)=>{const s={...t,...e},a=et(e.access_token);return s.profile.sub=a.sub,s.profile.account_number=a.account_number,s.expires_at=a.exp,s.is_federated=a.is_federated,R.setAccount({accountNumber:a.account_number,email:a.email,name:a.name,givenName:a.given_name,familyName:a.family_name,authTime:a.exp,accessToken:e.access_token,idToken:e.id_token}),localStorage.setItem(l,JSON.stringify(s)),s},at=e=>{$(e,null)},rt=()=>{const e=i();return e?e.access_token:null},nt=()=>{const e=i();return e&&e.is_federated!==null&&e.is_federated!==void 0?String(e.is_federated).toLowerCase()==="true":!1},ot=()=>{const e=i();return e!=null&&e.expires_at?e.expires_at>Date.now()/1e3:!1},it=["authenticate","auth-callback","logout"],ct=e=>e.expires_at&&new Date(e.expires_at*1e3),lt=e=>e.expires_at&&new Date(e.expires_at*1e3+ce*60*60*1e3),Y=()=>{const e=i();if(!K())return!0;if(!e.expires_at)return!1;const t=new Date;return navigator.onLine?t>ct(e):t>lt(e)},pt=()=>{const e=window.location.pathname.split("/");return it.includes(e[e.length-1])},ut=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="authenticate"?(E.signinRedirect(),!0):!1},_t=()=>{let e="/";const t=localStorage.getItem(_);t&&(localStorage.removeItem(_),e=t),window.location.href=e},dt=e=>{if(!e.id_token)throw new Error("Missing property:id_token");return e},m=e=>{const t=pt();(!t||e)&&(t||localStorage.setItem(_,window.location.href),window.location.href="/authenticate")},Et=async e=>{const t=`${e.profile.sub}-${e.profile.customer_id}`,s=await F(t);return{...e,profile:{...e.profile,hashed_identifier:s}}},mt=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="auth-callback"?(E.signinRedirectCallback().then(dt).then(Et).then(at).then(_t).catch(m),!0):!1};class ht extends S{render(){return c` <ix-splash-screen></ix-splash-screen> `}}window.customElements.define("splash-screen",ht);var gt=Object.defineProperty,At=(e,t,s)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,h=(e,t,s)=>At(e,typeof t!="symbol"?t+"":t,s);class Ct{constructor(){h(this,"permissions",[]),h(this,"loading",!1),h(this,"getPermissions",async()=>{var t;const s=(t=R)==null?void 0:t.access_token;if(!s)return[];const a=await fetch(`${P}/usermanagement/my-permissions?exclude_parents=false&exclude_siblings=true`,{headers:{Authorization:`Bearer ${s}`}});return a.ok?a.json():[]}),Z(this,{permissions:te,setPermissions:ee})}setPermissions(t){this.permissions=t.reduce((s,a)=>(s[a.permission_name]=a.privilege,s),{})}tryLoadPermissions(){try{this.loading||(this.loading=!0,this.getPermissions().then(t=>{this.setPermissions(t),this.loading=!1}).catch(()=>{this.loading=!1}))}catch(t){this.loading=!1}}clearPermissions(){this.setPermissions([])}hasExternalUserCreate(){return this.hasPermission(U,p)||this.hasPermission(H,p)}hasConnectivityCreate(){return this.hasPermission(d,p)}hasPrivilegeLevel(t,s){const a=[fe,p,Pe,Ne],r=a.findIndex(o=>o===t),n=a.findIndex(o=>o===s);return r>=n}hasPermission(t,s){let a=!1;const r=se(this.permissions),n=Object.keys(r).find(o=>o===t);return n&&(a=this.hasPrivilegeLevel(s,r[n])),a}}const g=new Ct;class A extends S{constructor(){super(),this._currentView="splash",this.appLoaded=!1,this._onPopState=()=>{Y()&&m()};try{Qe()}catch(s){console.error("Telemetry initialization failed:",s)}const t=window.location.pathname;if(t==="/session-expired"){this._currentView="session-expired",this._loadView("session-expired");return}if(t==="/logout"){this._currentView="logout",this._loadView("logout");return}if(ut()||mt()){this._currentView="splash";return}if(Y()){this._currentView="splash",m();return}this._currentView="app",this._loadApp()}async _loadView(t){t==="session-expired"?await import("@digital-realty/ix-app-logic/views/session-expiry.js"):t==="logout"&&await import("./logout-DwQJmwiJ.js")}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._onPopState)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._onPopState)}_getAccountNumber(){var t,s,a;return(a=new URLSearchParams(window.location.search).get("selected_account_number"))!=null?a:(s=(t=i())==null?void 0:t.profile)==null?void 0:s.account_number}_isESGAccessOnly(t,s){const a=t.filter(r=>r.account_number===s);return a.length===1&&a[0].permission_name==="ESG Reporting"}_applyMfeOverrides(t,s){const a={};for(const r of Object.keys(t))a[r]={...t[r],enabled:s.includes(r)};return a}async _loadApp(){var t;const{authedUser:s}=await import("@digital-realty/ix-account-switcher");await s.hydrateStore();const[a,r]=await Promise.allSettled([fetch("./registered-apps.json").then(J=>J.json()),g.getPermissions()]);if(a.status==="rejected"){console.error("Failed to load registered apps:",a.reason);return}if(r.status==="rejected"){console.error("Failed to load permissions:",r.reason);return}const{registeredApps:n}=a.value,o=r.value,z=(t=this._getAccountNumber())!=null?t:"",X=this._isESGAccessOnly(o,z)?this._applyMfeOverrides(n,["ui-esg"]):n;window.registeredApps=Object.freeze(X),g.setPermissions(o),await import("./app-Bjkcm8M8.js"),this.appLoaded=!0}render(){switch(this._currentView){case"session-expired":return c`<ix-session-expiry></ix-session-expiry>`;case"logout":return c`<ixp-logout></ixp-logout>`;case"app":return this.appLoaded?c`<global-portal-app appTitle="DLR" showDrawer></global-portal-app>`:c`<splash-screen></splash-screen>`;default:return c`<splash-screen></splash-screen>`}}}C([I({type:String})],A.prototype,"_currentView",void 0),C([I({type:Boolean})],A.prototype,"appLoaded",void 0),window.customElements.define("gp-bootstrap",A);export{N as A,Se as B,we as C,ye as D,oe as E,Te as F,ie as G,Re as H,He as I,Ae as J,ue as K,O as L,L as M,le as N,je as O,pe as P,Ie as Q,Xe as R,Be as S,Ce as T,H as U,ge as a,st as b,tt as c,rt as d,i as e,$ as f,K as g,T as h,P as i,Fe as j,nt as k,Ke as l,Ge as m,Ue as n,U as o,g as p,ve as q,b as r,Je as s,f as t,E as u,w as v,j as w,ot as x,l as y,Oe as z};
1
+ import{__decorate as C}from"tslib";import{LitElement as S,html as c}from"lit";import{property as I}from"lit/decorators.js";import{ApplicationInsights as W,DistributedTracingModes as q}from"@microsoft/applicationinsights-web";import{authedUser as R}from"@digital-realty/ix-account-switcher";import{UserManager as Q}from"oidc-client-ts";import"@digital-realty/ix-app-logic/views/splash-screen.js";import{makeObservable as Z,action as ee,observable as te,toJS as se}from"mobx";const T="planbglobalportalui",ae="openid service_management_profile offline_access user_management_profile resource.notifications resource.usermanagementapi resource.servicemanagementapi resource.inventory resource.cookieconsents",O="https://login.t1.globalportal.online",re="https://inxn-t1-gpappshell.azureedge.net/?logout=true",P="https://api.t1.globalportal.online",ne="",oe="local",ie="GTM-KXBK8CQP",ce=24,le="https://api.t1.globalportal.online",pe="ui-ticket-updates-accessAt,ix-grid-,-grid,app-state,releaseNotesViewed",ue="https://gp-dev.digitalrealty.com/standalone/knowledge-base",_e="https://portal.interxion.com",de="https://inxn-a1-gpappshell.azureedge.net",Ee="https://demo.servicefabric.digitalrealty.com/",me="https://marketplaceportal.com/group/telx-new-portal",he="gp-tst.digitalrealty.com",ge=!1,Ae="/cookie-policy",Ce="1.0",Se={strict:"strictly_necessary",performance:"performance",targeting:"targeting"},Ie={accept:"accept_all",reject:"reject_all",custom:"customize",no:"no_sell"},N="globalportalappshell",l="user-authentication",_="redirect-url",Re="ui-cookie-policy",Te="date-format",f="Global Portal",w="Service Fabric",L="Marketplace Portal",b="EMEA Customer Portal",Oe="x-auth",[p,Pe,Ne,fe]=["CREATE","UPDATE","READ","APPROVE"],[y,d,we,Le,v,be,wt,ye,U,Lt,ve,Ue,k,x,M,bt,ke,yt,xe,D,V,G,Me,B,De,Ve,H,Ge]=["Cloud Connect","Cross Connect","Custom Roles","Customer Care","Customer Equipment Connection (CEC)","Customer Support","DCIM-enabled location data","Default System Roles","External User","Facility Access","Internal Roles","Internal User","Internet Exchange","Intra-Customer Connectivity (ICC)","IP Bandwidth","OSP Access","Permanent Badge","PoP/POE Room Access","Remote Hands","Remote Hands Package","Service Exchange Cloud Router","Service Exchange Port","Shipping & Receiving","Space & Power","Trouble Ticket","Visitor Access","User","ESG Reporting"],Be=[xe,be,De,Me,Ve,ke,Le],He=[d,y,v,k,x,M,D,V,G,B],je=[d,y,v,k,x,M,D,V,G,B],Fe={LocationChanged:"location-changed",VaadinRouterLocationChanged:"vaadin-router-location-changed",CreateUserClicked:"create-user-clicked"},Ke={SessionStorage:{HasOutstandingChanges:"hasOutstandingChanges"}},[$e,Ye,ze]=["Security","DCIM","Planned Site Maintenance"],Xe=[$e,Ye,ze],Je=[{label:f,href:de,selected:!0},{label:L,href:me},{label:b,href:_e},{label:w,href:Ee,target:"_blank"}],j={appInsights:"_appInsights"},We=()=>{const e=new W({config:{instrumentationKey:ne,enableCorsCorrelation:!0,enableRequestHeaderTracking:!0,enableResponseHeaderTracking:!0,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,enableAjaxErrorStatusText:!0,enableAjaxPerfTracking:!0,enableUnhandledPromiseRejectionTracking:!0,isCookieUseDisabled:!0,distributedTracingMode:q.AI_AND_W3C,correlationHeaderExcludedDomains:he.split(",").map(t=>t.trim())}});return e.loadAppInsights(),e.trackPageView(),e.addTelemetryInitializer(t=>{t.tags["ai.cloud.role"]=N}),e},u=(e,t,s)=>(...a)=>{const[r,...n]=a;typeof r=="string"&&r.startsWith("[mobx]")&&t===4?s.trackException({exception:{message:n[0].message,stack:n[0].stack,name:r},severityLevel:4}):s.trackTrace({severityLevel:t,message:r},n),e.apply(console,[r,...n])},qe=e=>{console.log=u(console.log,2,e),console.info=u(console.info,2,e),console.warn=u(console.warn,3,e),console.error=u(console.error,4,e),window.console=console},Qe=()=>{const e=We();window[j.appInsights]=e,window.dispatchEvent(new Event("appInsightsInitialized")),qe(e)},F=async e=>{const t=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(s)).map(a=>a.toString(16).padStart(2,"0")).join("")};function Ze(){const{location:e}=window,t=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`;return{authority:O,client_id:T,redirect_uri:`${t}/auth-callback`,response_type:"code",scope:ae,post_logout_redirect_uri:re,monitorSession:!1}}const E=new Q(Ze()),et=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),s=decodeURIComponent(window.atob(t).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(s)},tt=()=>{localStorage.removeItem(l)},i=()=>{const e=localStorage.getItem(l);return e?JSON.parse(e):null},st=async()=>{const e=i();if(!e)return null;const t=(e.profile.given_name||"")+(e.profile.family_name||"")+e.profile.sub;return await F(t)},K=()=>{const e=i();return e?e.id_token:null},$=(e,t)=>{const s={...t,...e},a=et(e.access_token);return s.profile.sub=a.sub,s.profile.account_number=a.account_number,s.expires_at=a.exp,s.is_federated=a.is_federated,R.setAccount({accountNumber:a.account_number,email:a.email,name:a.name,givenName:a.given_name,familyName:a.family_name,authTime:a.exp,accessToken:e.access_token,idToken:e.id_token}),localStorage.setItem(l,JSON.stringify(s)),s},at=e=>{$(e,null)},rt=()=>{const e=i();return e?e.access_token:null},nt=()=>{const e=i();return e&&e.is_federated!==null&&e.is_federated!==void 0?String(e.is_federated).toLowerCase()==="true":!1},ot=()=>{const e=i();return e!=null&&e.expires_at?e.expires_at>Date.now()/1e3:!1},it=["authenticate","auth-callback","logout"],ct=e=>e.expires_at&&new Date(e.expires_at*1e3),lt=e=>e.expires_at&&new Date(e.expires_at*1e3+ce*60*60*1e3),Y=()=>{const e=i();if(!K())return!0;if(!e.expires_at)return!1;const t=new Date;return navigator.onLine?t>ct(e):t>lt(e)},pt=()=>{const e=window.location.pathname.split("/");return it.includes(e[e.length-1])},ut=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="authenticate"?(E.signinRedirect(),!0):!1},_t=()=>{let e="/";const t=localStorage.getItem(_);t&&(localStorage.removeItem(_),e=t),window.location.href=e},dt=e=>{if(!e.id_token)throw new Error("Missing property:id_token");return e},m=e=>{const t=pt();(!t||e)&&(t||localStorage.setItem(_,window.location.href),window.location.href="/authenticate")},Et=async e=>{const t=`${e.profile.sub}-${e.profile.customer_id}`,s=await F(t);return{...e,profile:{...e.profile,hashed_identifier:s}}},mt=()=>{const e=window.location.pathname.split("/");return e[e.length-1]==="auth-callback"?(E.signinRedirectCallback().then(dt).then(Et).then(at).then(_t).catch(m),!0):!1};class ht extends S{render(){return c` <ix-splash-screen></ix-splash-screen> `}}window.customElements.define("splash-screen",ht);var gt=Object.defineProperty,At=(e,t,s)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,h=(e,t,s)=>At(e,typeof t!="symbol"?t+"":t,s);class Ct{constructor(){h(this,"permissions",[]),h(this,"loading",!1),h(this,"getPermissions",async()=>{var t;const s=(t=R)==null?void 0:t.access_token;if(!s)return[];const a=await fetch(`${P}/usermanagement/my-permissions?exclude_parents=false&exclude_siblings=true`,{headers:{Authorization:`Bearer ${s}`}});return a.ok?a.json():[]}),Z(this,{permissions:te,setPermissions:ee})}setPermissions(t){this.permissions=t.reduce((s,a)=>(s[a.permission_name]=a.privilege,s),{})}tryLoadPermissions(){try{this.loading||(this.loading=!0,this.getPermissions().then(t=>{this.setPermissions(t),this.loading=!1}).catch(()=>{this.loading=!1}))}catch(t){this.loading=!1}}clearPermissions(){this.setPermissions([])}hasExternalUserCreate(){return this.hasPermission(U,p)||this.hasPermission(H,p)}hasConnectivityCreate(){return this.hasPermission(d,p)}hasPrivilegeLevel(t,s){const a=[fe,p,Pe,Ne],r=a.findIndex(o=>o===t),n=a.findIndex(o=>o===s);return r>=n}hasPermission(t,s){let a=!1;const r=se(this.permissions),n=Object.keys(r).find(o=>o===t);return n&&(a=this.hasPrivilegeLevel(s,r[n])),a}}const g=new Ct;class A extends S{constructor(){super(),this._currentView="splash",this.appLoaded=!1,this._onPopState=()=>{Y()&&m()};try{Qe()}catch(s){console.error("Telemetry initialization failed:",s)}const t=window.location.pathname;if(t==="/session-expired"){this._currentView="session-expired",this._loadView("session-expired");return}if(t==="/logout"){this._currentView="logout",this._loadView("logout");return}if(ut()||mt()){this._currentView="splash";return}if(Y()){this._currentView="splash",m();return}this._currentView="app",this._loadApp()}async _loadView(t){t==="session-expired"?await import("@digital-realty/ix-app-logic/views/session-expiry.js"):t==="logout"&&await import("./logout-DwQJmwiJ.js")}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._onPopState)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._onPopState)}_getAccountNumber(){var t,s,a;return(a=new URLSearchParams(window.location.search).get("selected_account_number"))!=null?a:(s=(t=i())==null?void 0:t.profile)==null?void 0:s.account_number}_isESGAccessOnly(t,s){const a=t.filter(r=>r.account_number===s);return a.length===1&&a[0].permission_name==="ESG Reporting"}_applyMfeOverrides(t,s){const a={};for(const r of Object.keys(t))a[r]={...t[r],enabled:s.includes(r)};return a}async _loadApp(){var t;const{authedUser:s}=await import("@digital-realty/ix-account-switcher");await s.hydrateStore();const[a,r]=await Promise.allSettled([fetch("./registered-apps.json").then(J=>J.json()),g.getPermissions()]);if(a.status==="rejected"){console.error("Failed to load registered apps:",a.reason);return}if(r.status==="rejected"){console.error("Failed to load permissions:",r.reason);return}const{registeredApps:n}=a.value,o=r.value,z=(t=this._getAccountNumber())!=null?t:"",X=this._isESGAccessOnly(o,z)?this._applyMfeOverrides(n,["ui-esg"]):n;window.registeredApps=Object.freeze(X),g.setPermissions(o),await import("./app-BH8lV3LS.js"),this.appLoaded=!0}render(){switch(this._currentView){case"session-expired":return c`<ix-session-expiry></ix-session-expiry>`;case"logout":return c`<ixp-logout></ixp-logout>`;case"app":return this.appLoaded?c`<global-portal-app appTitle="DLR" showDrawer></global-portal-app>`:c`<splash-screen></splash-screen>`;default:return c`<splash-screen></splash-screen>`}}}C([I({type:String})],A.prototype,"_currentView",void 0),C([I({type:Boolean})],A.prototype,"appLoaded",void 0),window.customElements.define("gp-bootstrap",A);export{N as A,Se as B,we as C,ye as D,oe as E,Te as F,ie as G,Re as H,He as I,Ae as J,ue as K,O as L,L as M,le as N,je as O,pe as P,Ie as Q,Xe as R,Be as S,Ce as T,H as U,ge as a,st as b,tt as c,rt as d,i as e,$ as f,K as g,T as h,P as i,Fe as j,nt as k,Ke as l,Ge as m,Ue as n,U as o,g as p,ve as q,b as r,Je as s,f as t,E as u,w as v,j as w,ot as x,l as y,Oe as z};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-realty/app-shell",
3
- "version": "11.0.1-rc.1",
3
+ "version": "11.0.1-rc.3",
4
4
  "license": "UNLICENSED",
5
5
  "contributors": [
6
6
  "DLR"